Class CbJxMessageInfo
package: src.net.jxta.impl.endpoint.cbjx
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
CbJxMessageInfo(InputStream stream, MimeMediaType type)
   creates a new Message information by parsing the given stream
 
Method Summary
public EndpointAddress
   retrieve the destination address of the message
 
public Document
getDocument(MimeMediaType asMimeType)
   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
handleElement(XMLElement elem)
   Called to handle elements during parsing.
 
protected void
initialize(Element root)
   internal method to process a document into an advertisement.
 
public void
setDestinationAddress(EndpointAddress addr)
   set the destination address of the message
 
public void
setPeerCert(Certificate cert)
   set the peer certificate
 
public void
setSourceAddress(EndpointAddress addr)
   set the source address of the messsage
 
public void
setSourceID(ID src)
   set the source id of the message
 
Field Detail
destinationAddress
private EndpointAddress destinationAddress = null
the destination address of the message

DOCTYPE
private final static String DOCTYPE = "CbJxMessageInfo"
the root element for the information's XML document

LOG
private final static transient Logger LOG = Logger.getLogger(CbJxMessageInfo.class.getName())
Log4J Logger
transient

rootCert
private Certificate rootCert = null
the peer root cert

sourceAddress
private EndpointAddress sourceAddress = null
the source address of the message

sourceID
private ID sourceID = null
the source ID of the sender

tagDestination
private final static String tagDestination = "DestinationAddress"
the element name of the destination address

tagPeerCert
private final static String tagPeerCert = "PeerCert"
the element name for the peer certificate

tagSource
private final static String tagSource = "SourceAddress"
the element name of the source address

tagSourceID
private final static String tagSourceID = "SourceID"
the element name for the sourceID of the message
Constructor Detail
CbJxMessageInfo
public CbJxMessageInfo()
creates a new information object

CbJxMessageInfo
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
Method Detail
getDestinationAddress
public EndpointAddress getDestinationAddress()
retrieve the destination address of the message
Return:
String the original destination address of the message

getDocument
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

getPeerCert
public Certificate getPeerCert()
retrieve the peer certificate
Return:
Certificate the peer certificate

getSourceAddress
public EndpointAddress getSourceAddress()
retrieve the original source address of the message
Return:
String the original source address of the message

getSourceID
public ID getSourceID()
retrieve the source id of the message
Return:
String the source id of the sender

handleElement
protected boolean handleElement(XMLElement elem)
Called to handle elements during parsing.
Parameters:
elem Element to parse
Return:
true if element was handled, otherwise false.

initialize
protected void initialize(Element root)
internal method to process a document into an advertisement.
Parameters:
root where to start.

setDestinationAddress
public void setDestinationAddress(EndpointAddress addr)
set the destination address of the message
Parameters:
addr the destination address

setPeerCert
public void setPeerCert(Certificate cert)
set the peer certificate
Parameters:
cert the peer certificate

setSourceAddress
public void setSourceAddress(EndpointAddress addr)
set the source address of the messsage
Parameters:
addr the source address

setSourceID
public void setSourceID(ID src)
set the source id of the message
Parameters:
src the ID of the sender