public class CbJxMessageInfo
this class defines the xml document used to store message information
that is useful for the cbjx endpoint
| Field Summary |
private EndpointAddress |
the destination address of the message |
private final static String |
the root element for the information's XML document |
private final static transient Logger |
Log4J Logger |
private Certificate |
the peer root cert |
private EndpointAddress |
the source address of the message |
private ID |
the source ID of the sender |
private final static String |
the element name of the destination address |
private final static String |
the element name for the peer certificate |
private final static String |
the element name of the source address |
private final static String |
the element name for the sourceID of the message |
| Constructor Summary |
public |
creates a new information object |
public |
creates a new Message information by parsing the given stream |
| Method Summary |
public EndpointAddress |
retrieve the destination address of the message |
public Document |
returns a Document containing the information's document tree |
public Certificate |
retrieve the peer certificate |
public EndpointAddress |
retrieve the original source address of the message |
public ID |
retrieve the source id of the message |
protected boolean |
Called to handle elements during parsing. |
protected void |
internal method to process a document into an advertisement. |
public void |
set the destination address of the message |
public void |
set the peer certificate |
public void |
set the source address of the messsage |
public void |
set the source id of the message |
private EndpointAddress destinationAddress = null
the destination address of the message
private final static String DOCTYPE = "CbJxMessageInfo"
the root element for the information's XML document
private final static transient Logger LOG = Logger.getLogger(CbJxMessageInfo.class.getName())
Log4J Logger
transient
private Certificate rootCert = null
the peer root cert
private EndpointAddress sourceAddress = null
the source address of the message
private ID sourceID = null
the source ID of the sender
private final static String tagDestination = "DestinationAddress"
the element name of the destination address
private final static String tagPeerCert = "PeerCert"
the element name for the peer certificate
private final static String tagSource = "SourceAddress"
the element name of the source address
private final static String tagSourceID = "SourceID"
the element name for the sourceID of the message
public CbJxMessageInfo()
creates a new information object
public CbJxMessageInfo(InputStream stream, MimeMediaType type)
creates a new Message information by parsing the given stream
Throws:
IOException
Parameters:
stream the InputStream source of the info data
Exceptions:
IOException if the info can't be parsed from the stream
public EndpointAddress getDestinationAddress()
retrieve the destination address of the message
Return:
String the original destination address of the message
public Document getDocument(MimeMediaType asMimeType)
returns a Document containing the information's document tree
Parameters:
asMimeType the desired MIME type for the information rendering
Return:
Document the Document containing the information's document tree
public Certificate getPeerCert()
retrieve the peer certificate
Return:
Certificate the peer certificate
public EndpointAddress getSourceAddress()
retrieve the original source address of the message
Return:
String the original source address of the message
public ID getSourceID()
retrieve the source id of the message
Return:
String the source id of the sender
protected boolean handleElement(XMLElement elem)
Called to handle elements during parsing.
Parameters:
elem Element to parse
Return:
true if element was handled, otherwise false.
protected void initialize(Element root)
internal method to process a document into an advertisement.
Parameters:
root where to start.
public void setDestinationAddress(EndpointAddress addr)
set the destination address of the message
Parameters:
addr the destination address
public void setPeerCert(Certificate cert)
set the peer certificate
Parameters:
cert the peer certificate
public void setSourceAddress(EndpointAddress addr)
set the source address of the messsage
Parameters:
addr the source address
public void setSourceID(ID src)
set the source id of the message
Parameters:
src the ID of the sender