Class PingMessage
- java.lang.Object
- 
- xdevs.core.simulation.distributed.PingMessage
 
- 
 public class PingMessage extends Object Class to transmit a message to a remote host and receive the response. This class implements a message to be transmitted to a remote host. It contains a message and a destination host and port. It also contains a method to send the message and receive the response.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringDEFAULT_DESTINATION_HOSTDefault destination host.static intDEFAULT_DESTINATION_PORTDefault destination port.
 - 
Constructor SummaryConstructors Constructor Description PingMessage(MessageDistributed message)Constructor for the ping message.PingMessage(MessageDistributed message, String destinationHost, int destinationPort)Constructor for the ping message.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageDistributedping()Send the message and receive the response.
 
- 
- 
- 
Field Detail- 
DEFAULT_DESTINATION_HOSTpublic static final String DEFAULT_DESTINATION_HOST Default destination host.- See Also:
- Constant Field Values
 
 - 
DEFAULT_DESTINATION_PORTpublic static final int DEFAULT_DESTINATION_PORT Default destination port.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
PingMessagepublic PingMessage(MessageDistributed message, String destinationHost, int destinationPort) Constructor for the ping message.- Parameters:
- message- Message for the ping
- destinationHost- Destination host for the ping
- destinationPort- Destination port for the ping
 
 - 
PingMessagepublic PingMessage(MessageDistributed message) Constructor for the ping message.- Parameters:
- message- Message for the ping
 
 
- 
 - 
Method Detail- 
pingpublic MessageDistributed ping() Send the message and receive the response.- Returns:
- The response to the message
 
 
- 
 
-