Class WelcomeMessage
- java.lang.Object
-
- org.drasyl.peer.connection.message.AbstractMessage
-
- org.drasyl.peer.connection.message.WelcomeMessage
-
- All Implemented Interfaces:
Message
,ResponseMessage<JoinMessage>
public class WelcomeMessage extends AbstractMessage implements ResponseMessage<JoinMessage>
A message representing the welcome message of the node server, including fallback information..
-
-
Field Summary
Fields Modifier and Type Field Description static Supplier<String>
defaultUserAgentGenerator
static Supplier<String>
userAgentGenerator
-
Fields inherited from class org.drasyl.peer.connection.message.AbstractMessage
id
-
-
Constructor Summary
Constructors Constructor Description WelcomeMessage(PeerInformation peerInformation, String correspondingId)
Creates new welcome message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getCorrespondingId()
Returns the id of theRequestMessage
to which this response corresponds.PeerInformation
getPeerInformation()
String
getUserAgent()
int
hashCode()
String
toString()
-
Methods inherited from class org.drasyl.peer.connection.message.AbstractMessage
getId
-
-
-
-
Constructor Detail
-
WelcomeMessage
public WelcomeMessage(PeerInformation peerInformation, String correspondingId)
Creates new welcome message.- Parameters:
peerInformation
- the peer information of the node servercorrespondingId
-
-
-
Method Detail
-
getPeerInformation
public PeerInformation getPeerInformation()
-
getCorrespondingId
public String getCorrespondingId()
Description copied from interface:ResponseMessage
Returns the id of theRequestMessage
to which this response corresponds.- Specified by:
getCorrespondingId
in interfaceResponseMessage<JoinMessage>
- Returns:
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object o)
-
toString
public String toString()
- Overrides:
toString
in classAbstractMessage
-
getUserAgent
public String getUserAgent()
-
-