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, MessageId correspondingId)
Creates new welcome message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
MessageId
getCorrespondingId()
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, MessageId correspondingId)
Creates new welcome message.- Parameters:
peerInformation
- the peer information of the node servercorrespondingId
- the corresponding id of the previous join message
-
-
Method Detail
-
getPeerInformation
public PeerInformation getPeerInformation()
-
getCorrespondingId
public MessageId getCorrespondingId()
- Specified by:
getCorrespondingId
in interfaceResponseMessage<JoinMessage>
- Returns:
- the id of the
RequestMessage
to which this response corresponds
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object o)
-
toString
public String toString()
- Overrides:
toString
in classAbstractMessage
-
getUserAgent
public String getUserAgent()
-
-