public class DiscoveryIncomingMessage extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractDiscoveryMessage.Payload
Enum holding the possible values for the discovery request/response.
|
Modifier and Type | Field and Description |
---|---|
static int |
MAX_MSG_SIZE |
Constructor and Description |
---|
DiscoveryIncomingMessage(DatagramPacket pPacket)
Parse a message from a datagram packet.
|
Modifier and Type | Method and Description |
---|---|
AgentDetails |
getAgentDetails() |
protected byte[] |
getBytes(String pRespond) |
byte[] |
getData() |
InetAddress |
getSourceAddress() |
int |
getSourcePort() |
boolean |
isQuery() |
boolean |
isResponse() |
static Map<AbstractDiscoveryMessage.Payload,Object> |
parseData(byte[] pData,
int pLength) |
protected void |
setAgentDetails(AgentDetails pAgentDetails) |
protected void |
setType(org.jolokia.discovery.AbstractDiscoveryMessage.MessageType pType) |
String |
toString() |
public static final int MAX_MSG_SIZE
public DiscoveryIncomingMessage(DatagramPacket pPacket) throws IOException
pPacket
- packet receivedIOException
- if reading/parsing failed.public InetAddress getSourceAddress()
public int getSourcePort()
public String toString()
public static Map<AbstractDiscoveryMessage.Payload,Object> parseData(byte[] pData, int pLength) throws IOException
IOException
protected final void setType(org.jolokia.discovery.AbstractDiscoveryMessage.MessageType pType)
protected final void setAgentDetails(AgentDetails pAgentDetails)
public boolean isQuery()
public boolean isResponse()
public byte[] getData()
public AgentDetails getAgentDetails()
protected byte[] getBytes(String pRespond)
Copyright © 2021. All rights reserved.