com.echomine.jabber
Class NullMessage

java.lang.Object
  extended by com.echomine.jabber.JabberMessage
      extended by com.echomine.jabber.NullMessage

public class NullMessage
extends JabberMessage

This message represents a null message that does absolutely nothing. The reason it is here is to provide a mechanism for sending a NOOP message that can be used to provide keepalive pings. Because the Jabber communication is based on XML, spaces and newlines doesn't affect the output or processing of the message. In this message, we use a space instead.


Field Summary
 
Fields inherited from class com.echomine.jabber.JabberMessage
messageID
 
Constructor Summary
NullMessage()
           
 
Method Summary
 java.lang.String encode()
          encodes the data into an XML string that is ready to be sent out to the network.
 int getMessageType()
          This method will indicate what type of message it is.
 
Methods inherited from class com.echomine.jabber.JabberMessage
getMessageID, getReplyMessage, getTimeout, getXMessage, getXMessages, interrupt, isReplyRequired, isSendXMessages, isSynchronized, replyReceived, setMessageID, setReplyRequired, setSendXMessages, setSynchronized, setTimeout, setXMessage, setXMessages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullMessage

public NullMessage()
Method Detail

getMessageType

public int getMessageType()
Description copied from class: JabberMessage
This method will indicate what type of message it is. Currently, the unique way to identify a message is through an arbitrarily assigned int that's listed in JabberCode. By comparing the message type, you can then filter out the exact type of message you're looking for.

Specified by:
getMessageType in class JabberMessage
Returns:
a message code that is unique to the message
See Also:
JabberCode

encode

public java.lang.String encode()
                        throws ParseException
Description copied from class: JabberMessage
encodes the data into an XML string that is ready to be sent out to the network. This method is only used for outgoing messages.

Specified by:
encode in class JabberMessage
Throws:
ParseException - if something went wrong during encoding


Copyright © 2001-2005 Echomine. All Rights Reserved.