Class JoinMessage
- java.lang.Object
-
- org.drasyl.peer.connection.message.AbstractMessage
-
- org.drasyl.peer.connection.message.JoinMessage
-
- All Implemented Interfaces:
Message
,RequestMessage
public class JoinMessage extends AbstractMessage implements RequestMessage
A message representing a join to the node server.
-
-
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 JoinMessage(ProofOfWork proofOfWork, CompressedPublicKey publicKey, boolean childrenJoin, Set<CompressedPublicKey> childrenAndGrandchildren)
Creates a new join message.JoinMessage(ProofOfWork proofOfWork, CompressedPublicKey publicKey, Set<CompressedPublicKey> childrenAndGrandchildren)
Creates a new join message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Set<CompressedPublicKey>
getChildrenAndGrandchildren()
ProofOfWork
getProofOfWork()
CompressedPublicKey
getPublicKey()
String
getUserAgent()
int
hashCode()
boolean
isChildrenJoin()
String
toString()
-
Methods inherited from class org.drasyl.peer.connection.message.AbstractMessage
getId
-
-
-
-
Constructor Detail
-
JoinMessage
public JoinMessage(ProofOfWork proofOfWork, CompressedPublicKey publicKey, Set<CompressedPublicKey> childrenAndGrandchildren)
Creates a new join message.- Parameters:
proofOfWork
- the proof of workpublicKey
- the identity of the joining nodechildrenAndGrandchildren
- the (grand-)children of this node
-
JoinMessage
public JoinMessage(ProofOfWork proofOfWork, CompressedPublicKey publicKey, boolean childrenJoin, Set<CompressedPublicKey> childrenAndGrandchildren)
Creates a new join message.- Parameters:
proofOfWork
- the proof of workpublicKey
- the identity of the joining nodechildrenJoin
- join peer as childrenchildrenAndGrandchildren
- the (grand-)children of this node
-
-
Method Detail
-
isChildrenJoin
public boolean isChildrenJoin()
-
getChildrenAndGrandchildren
public Set<CompressedPublicKey> getChildrenAndGrandchildren()
-
getPublicKey
public CompressedPublicKey getPublicKey()
-
getProofOfWork
public ProofOfWork getProofOfWork()
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object o)
-
toString
public String toString()
- Overrides:
toString
in classAbstractMessage
-
getUserAgent
public String getUserAgent()
-
-