ch.epfl.lsr.apex
Class APEXAttachMessage

java.lang.Object
  extended bych.epfl.lsr.apex.APEXMessage
      extended bych.epfl.lsr.apex.APEXAttachMessage
All Implemented Interfaces:
Cloneable

public class APEXAttachMessage
extends APEXMessage

An APEXAttachMessage is the message sent for attachments and defines its syntax as it is specified in the Application Exchange (APEX) Protocol RFC3340 DTD.

Author:
Marc Stoecklin
See Also:
APEXMessage

Field Summary
(package private)  APEXEndpointAddress endpoint
          The endpoint address to attach as
(package private)  int transID
          A transaction identifier for this transaction
 
Fields inherited from class ch.epfl.lsr.apex.APEXMessage
APPBEEPXML, ATTACH, BEEPXML, BIND, CONTENTTRANSFERENCODING, CONTENTTYPE, DATA, ENC_7BIT, ENC_8BIT, ENC_BASE64, ENC_BINARY, ENC_QUOTEDPRINTABLE, ENC_UUENCODE, ERROR, FILENAME, message, MIMECONTENT, MIMECONTENT_HASHKEY, OK, RELATED, START, START_HASHKEY, status, STRINGCONTENT, STRINGCONTENT_HASHKEY, TERMINATE, TYPE, XMLCONTENT, XMLCONTENT_HASHKEY
 
Constructor Summary
APEXAttachMessage(APEXEndpointAddress endpoint, int transID)
          Instantiates an attach message for the specified endpoint address and the transaction identifier.
 
Method Summary
static APEXAttachMessage getAttachMessage(APEXEndpointAddress endpoint, int transID)
          Returns an attach message for the specified endpoint address and the transaction identifier in a static way.
 APEXEndpointAddress getEndpoint()
          Returns the endpoint address of this attach message.
 int getTransID()
          Returns the transaction identifier of this attach message.
static String getXMLAttachMessage(APEXEndpointAddress endpoint, int transID)
          Returns an XML attach message for the specified endpoint address and the transaction identifier in a static way.
 String getXMLMessage()
          Returns an XML attach message for the specified endpoint address and the transaction identifier.
 
Methods inherited from class ch.epfl.lsr.apex.APEXMessage
apexMessageFactory, buildMimeBodyPart, getDataStream, getMessage, getMimeMessage, getMimeMultipart, getStatus, hashset2AddressTable, MimeBodyPartToString, setMessage, setStatus, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

endpoint

APEXEndpointAddress endpoint
The endpoint address to attach as


transID

int transID
A transaction identifier for this transaction

Constructor Detail

APEXAttachMessage

public APEXAttachMessage(APEXEndpointAddress endpoint,
                         int transID)
Instantiates an attach message for the specified endpoint address and the transaction identifier.

Parameters:
endpoint - An endpoint address
transID - A transaction identifier
Method Detail

getAttachMessage

public static APEXAttachMessage getAttachMessage(APEXEndpointAddress endpoint,
                                                 int transID)
Returns an attach message for the specified endpoint address and the transaction identifier in a static way.

Parameters:
endpoint - An endpoint address
transID - A transaction identifier
Returns:
The attach message

getXMLAttachMessage

public static String getXMLAttachMessage(APEXEndpointAddress endpoint,
                                         int transID)
Returns an XML attach message for the specified endpoint address and the transaction identifier in a static way.

Parameters:
endpoint - An endpoint address
transID - A transaction identifier
Returns:
A string containing XML code

getXMLMessage

public String getXMLMessage()
Returns an XML attach message for the specified endpoint address and the transaction identifier.

Specified by:
getXMLMessage in class APEXMessage
Returns:
A string containing XML code

getEndpoint

public APEXEndpointAddress getEndpoint()
Returns the endpoint address of this attach message.

Returns:
The endpoint address

getTransID

public int getTransID()
Returns the transaction identifier of this attach message.

Returns:
The transaction identifier