Coalevo Logo

net.coalevo.empp.model
Interface EMPPPacket

All Superinterfaces:
Recyclable
All Known Subinterfaces:
ErrorStanza, ExtensibleStanza, InstantMessage, IQ, Presence, Session, Stanza

public interface EMPPPacket
extends Recyclable

This interface defines a EMPPPacket.

Version:
0.0.1 (31/01/2009)
Author:
Dieter Wimberger (coalevo)

Method Summary
 EMPPPacket createInstance()
          Factory method to create a new instance of the implementing class.
 AgentIdentifier getFrom()
          Returns the AgentIdentifier that corresponds to the sender of this EMPPPacket.
 PacketKind getKind()
          Returns the PacketKind of this EMPPPacket.
 java.lang.String getSessionIdentifier()
          Returns the session identifier of this EMPPPacket.
 AgentIdentifier getTo()
          Returns the AgentIdentifier that corresponds to the receiver of this EMPPPacket.
 boolean hasFrom()
          Tests if this EMPPPacket has a corresponding sender AgentIdentifier.
 void parsePayload()
          Parses the payload of this EMPPPacket.
 void preparePayload()
          Prepares the payload of this EMPPPacket.
 void readFrom(java.io.DataInput din)
          Reads this EMPPPacket from the given DataInputStream.
 void setFrom(AgentIdentifier jid)
          Sets the AgentIdentifier that corresponds to the sender of this EMPPPacket.
 void setSessionIdentifier(java.lang.String id)
          Sets the session identifier of this EMPPPacket.
 void setTo(AgentIdentifier jid)
          Sets the AgentIdentifier that corresponds to the receiver of this EMPPPacket.
 void writeTo(java.io.DataOutput dout)
          Writes this EMPPPacket to the given DataOutputStream.
 
Methods inherited from interface net.coalevo.empp.util.Recyclable
recycle
 

Method Detail

getTo

AgentIdentifier getTo()
Returns the AgentIdentifier that corresponds to the receiver of this EMPPPacket.

Returns:
the AgentIdentifier instance of the sender.

setTo

void setTo(AgentIdentifier jid)
Sets the AgentIdentifier that corresponds to the receiver of this EMPPPacket.

Parameters:
jid - the AgentIdentifier instance of the sender.

getFrom

AgentIdentifier getFrom()
Returns the AgentIdentifier that corresponds to the sender of this EMPPPacket.

Returns:
the AgentIdentifier instance of the sender.

setFrom

void setFrom(AgentIdentifier jid)
Sets the AgentIdentifier that corresponds to the sender of this EMPPPacket.

Parameters:
jid - the AgentIdentifier instance of the sender.

hasFrom

boolean hasFrom()
Tests if this EMPPPacket has a corresponding sender AgentIdentifier.

Returns:
true if this EMPPPacket has a sender false otherwise.

getSessionIdentifier

java.lang.String getSessionIdentifier()
Returns the session identifier of this EMPPPacket.

Returns:
a session identifier.

setSessionIdentifier

void setSessionIdentifier(java.lang.String id)
Sets the session identifier of this EMPPPacket.

Parameters:
id - the identifier.

getKind

PacketKind getKind()
Returns the PacketKind of this EMPPPacket.

Returns:
the PacketKind of this EMPPPacket.

preparePayload

void preparePayload()
Prepares the payload of this EMPPPacket.


parsePayload

void parsePayload()
                  throws javax.xml.stream.XMLStreamException,
                         MalformedContentException,
                         MalformedStructureException
Parses the payload of this EMPPPacket.

Throws:
MalformedStructureException - if the structure of the Payload is not wellformed or invalid.
MalformedContentException - if the content of the Payload is not wellformed or invalid.
javax.xml.stream.XMLStreamException

writeTo

void writeTo(java.io.DataOutput dout)
             throws java.io.IOException
Writes this EMPPPacket to the given DataOutputStream.

Parameters:
dout - the DataOutput to write to.
Throws:
java.io.IOException - if an I/O error occurs.

readFrom

void readFrom(java.io.DataInput din)
              throws java.io.IOException,
                     MalformedAgentIdentifierException
Reads this EMPPPacket from the given DataInputStream.

Parameters:
din - the DataInput to read from.
Throws:
java.io.IOException - if an I/O error occurs or the data is invalid.
MalformedAgentIdentifierException - if the from or to address is malformed.

createInstance

EMPPPacket createInstance()
Factory method to create a new instance of the implementing class.

Returns:
an EMPPPacket instance.

Coalevo Logo

(c) 2004-2009 VFI (http://www.vfi.or.at)