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(String id, CompressedPublicKey publicKey, String correspondingId)
IamMessage(CompressedPublicKey publicKey, String correspondingId)
-
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.CompressedPublicKey
getPublicKey()
int
hashCode()
String
toString()
-
Methods inherited from class org.drasyl.peer.connection.message.AbstractMessage
getId
-
-
-
-
Constructor Detail
-
IamMessage
public IamMessage(String id, CompressedPublicKey publicKey, String correspondingId)
-
IamMessage
public IamMessage(CompressedPublicKey publicKey, String correspondingId)
-
-
Method Detail
-
getCorrespondingId
public String getCorrespondingId()
Description copied from interface:ResponseMessage
Returns the id of theRequestMessage
to which this response corresponds.- Specified by:
getCorrespondingId
in interfaceResponseMessage<WhoAreYouMessage>
- Returns:
-
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
-
-