Class IamMessage
- java.lang.Object
-
- org.drasyl.peer.connection.message.AbstractMessage
-
- org.drasyl.peer.connection.message.IamMessage
-
- All Implemented Interfaces:
Message
,ResponseMessage<WhoAreYouMessage>
public class IamMessage extends AbstractMessage implements ResponseMessage<WhoAreYouMessage>
This message is used as response to aWhoAreYouMessage
and contains the public key of this peer.
-
-
Field Summary
-
Fields inherited from class org.drasyl.peer.connection.message.AbstractMessage
id
-
-
Constructor Summary
Constructors Constructor Description IamMessage(CompressedPublicKey publicKey, MessageId correspondingId)
IamMessage(MessageId id, CompressedPublicKey publicKey, MessageId correspondingId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
MessageId
getCorrespondingId()
CompressedPublicKey
getPublicKey()
int
hashCode()
String
toString()
-
Methods inherited from class org.drasyl.peer.connection.message.AbstractMessage
getId
-
-
-
-
Constructor Detail
-
IamMessage
public IamMessage(MessageId id, CompressedPublicKey publicKey, MessageId correspondingId)
-
IamMessage
public IamMessage(CompressedPublicKey publicKey, MessageId correspondingId)
-
-
Method Detail
-
getCorrespondingId
public MessageId getCorrespondingId()
- Specified by:
getCorrespondingId
in interfaceResponseMessage<WhoAreYouMessage>
- Returns:
- the id of the
RequestMessage
to which this response corresponds
-
getPublicKey
public CompressedPublicKey getPublicKey()
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAbstractMessage
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractMessage
-
toString
public String toString()
- Overrides:
toString
in classAbstractMessage
-
-