courses.dsv2pvt.messageclasses
Class Ping

java.lang.Object
  extended bycourses.dsv2pvt.messageclasses.Msg
      extended bycourses.dsv2pvt.messageclasses.Ping
All Implemented Interfaces:
Serializable

public class Ping
extends Msg

An implementation of the server's inquiry message to determine whether a client is connected and functioning well. The Ping message contains the timeout before which the client must respond in order to be disconnected. The specification requires the client to respond to a Ping with a Pong, otherwise the client will be disconnected.

See Also:
Serialized Form

Constructor Summary
Ping(long timeoutmillis)
          Creates a ping message with the specified timeout time in milliseconds from 1/1 1970 0:00.
 
Method Summary
 long getTimeout()
          Returns the timeout time in milliseconds from 1/1 1970 0:00.
 
Methods inherited from class courses.dsv2pvt.messageclasses.Msg
getSender, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Ping

public Ping(long timeoutmillis)
Creates a ping message with the specified timeout time in milliseconds from 1/1 1970 0:00.

Method Detail

getTimeout

public long getTimeout()
Returns the timeout time in milliseconds from 1/1 1970 0:00.