ch.epfl.lsr.apex
Class APEXBindMessage

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

public class APEXBindMessage
extends APEXMessage

An APEXBindMessage is the message sent for bindings 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)  String relay
          A relay domain address
(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
APEXBindMessage(String relay, int transID)
          Instantiates an bind message for the specified relay address and the transaction identifier.
 
Method Summary
static APEXBindMessage getBindMessage(String relay, int transID)
          Returns an bind message for the specified relay address and the transaction identifier in a static way.
 String getRelay()
          Returns the relay address of this bind message.
 int getTransID()
          Returns the transaction identifier of this bind message.
static String getXMLBindMessage(String relay, int transID)
          Returns an XML bind message for the specified relay address and the transaction identifier in a static way.
 String getXMLMessage()
          Returns an XML bind 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

relay

String relay
A relay domain address


transID

int transID
A transaction identifier for this transaction

Constructor Detail

APEXBindMessage

public APEXBindMessage(String relay,
                       int transID)
Instantiates an bind message for the specified relay address and the transaction identifier.

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

getBindMessage

public static APEXBindMessage getBindMessage(String relay,
                                             int transID)
Returns an bind message for the specified relay address and the transaction identifier in a static way.

Parameters:
relay - An relay address
transID - A transaction identifier
Returns:
The bind message

getXMLBindMessage

public static String getXMLBindMessage(String relay,
                                       int transID)
Returns an XML bind message for the specified relay address and the transaction identifier in a static way.

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

getXMLMessage

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

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

getRelay

public String getRelay()
Returns the relay address of this bind message.

Returns:
The relay address

getTransID

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

Returns:
The transaction identifier