gumbo.net.msg
Class MsgPingCommand

java.lang.Object
  |
  +--gumbo.net.msg.Message
        |
        +--gumbo.net.msg.ascii.AsciiMessage
              |
              +--gumbo.net.msg.MsgPingCommand
All Implemented Interfaces:
java.io.Serializable

public class MsgPingCommand
extends AsciiMessage

A command message commanding the target, typically the system server, to respond with a MsgPingStatus message.

Parameters

  • Start time (number): The time at which this message was sent. Expressed in milliseconds since January 1, 1970, 0:00:00 GMT. If unititialized when the message is written it will be set to the head's source time.

    Data

    (none)

    Version:
    $Revision: 1.6 $
    Author:
    Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.
    See Also:
    Serialized Form

    Field Summary
    static java.lang.String BODY_VERSION
               
     
    Constructor Summary
    MsgPingCommand()
               
    MsgPingCommand(AsciiMessageHead head)
               
     
    Method Summary
    protected  void beforeBodyWrite()
              Called just before the message body is written.
     java.lang.String getBodyVersion()
              Gets the version for the message body data format.
     long getStartTime()
               
     void readAsciiBody()
              Reads the body of this message from an ASCII message reader.
     void setStartTime(long time)
               
     java.lang.String toBodyString()
              Creates a new string representing the contents of the message body for status messages.
     void writeAsciiBody()
              Writes the body of this message to an ASCII message writer.
     
    Methods inherited from class gumbo.net.msg.ascii.AsciiMessage
    createAsciiMessage, defaultHead, readAsciiMessage, writeAsciiMessage
     
    Methods inherited from class gumbo.net.msg.Message
    getHead, getMessageType, setHead, toString
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    BODY_VERSION

    public static final java.lang.String BODY_VERSION
    See Also:
    Constant Field Values
    Constructor Detail

    MsgPingCommand

    public MsgPingCommand()

    MsgPingCommand

    public MsgPingCommand(AsciiMessageHead head)
                   throws MessageDataException
    Method Detail

    setStartTime

    public void setStartTime(long time)

    getStartTime

    public long getStartTime()

    getBodyVersion

    public java.lang.String getBodyVersion()
    Description copied from class: Message
    Gets the version for the message body data format. Used for head creation. Never null.

    Specified by:
    getBodyVersion in class Message

    beforeBodyWrite

    protected void beforeBodyWrite()
    Description copied from class: Message
    Called just before the message body is written. The default is to do nothing. Override as needed.

    Overrides:
    beforeBodyWrite in class Message

    toBodyString

    public java.lang.String toBodyString()
    Description copied from class: Message
    Creates a new string representing the contents of the message body for status messages. Never null.

    Specified by:
    toBodyString in class Message

    readAsciiBody

    public void readAsciiBody()
                       throws java.io.IOException,
                              MessageIOException
    Description copied from class: AsciiMessage
    Reads the body of this message from an ASCII message reader. Does not call afterBodyRead() or read the message end delimiter. Blocks until the body is read. Overriders should use the head's reader to read the body unit (i.e. entire message should be read from the same reader).

    Specified by:
    readAsciiBody in class AsciiMessage
    Throws:
    MessageIOException - Reader not at message body, or message head format was bad.
    java.io.IOException

    writeAsciiBody

    public void writeAsciiBody()
                        throws java.io.IOException,
                               MessageIOException
    Description copied from class: AsciiMessage
    Writes the body of this message to an ASCII message writer. Does not call beforeBodyWrite() or write the message end delimiter. Blocks until the body is written. Overriders should use the head's writer to write the body unit (i.e. entire message should be written to the same writer).

    Specified by:
    writeAsciiBody in class AsciiMessage
    Throws:
    MessageIOException - Writer not at message body, or message head format was bad.
    java.io.IOException