Project JXTA

net.jxta.impl.protocol
Class PipeResolverMsg

java.lang.Object
  extended bynet.jxta.protocol.PipeResolverMessage
      extended bynet.jxta.impl.protocol.PipeResolverMsg

public class PipeResolverMsg
extends PipeResolverMessage

This class implements PipeResolverMessage by providing initialize(Element) and getDocument(MimeMediaType) implementations.

It implements the PipeResolver message for the standard Pipe Binding Protocol (PBP) with the following schema:


 <xs:element name="jxta:PipeResolver" type="jxta:PipeResolver"/>

 <xs:simpleType name="PipeResolverMsgType">
   <xs:restriction base="xs:string">
     <!-- QUERY -->
     <xs:enumeration value="Query"/>
     <!-- ANSWER -->
     <xs:enumeration value="Answer"/>
   </xs:restriction>
 </xs:simpleType>

 <xs:complexType name="PipeResolver">
   <xs:sequence>
     <xs:element name="MsgType" type="jxta:PipeResolverMsgType"/>
     <xs:element name="PipeId" type="jxta:JXTAID"/>
 <xs:element name="Type" type="xs:string"/>

     <!-- used in the query -->
 <xs:element name="Cached" type="xs:boolean" default="true" minOccurs="0"/>
     <xs:element name="Peer" type="jxta:JXTAID" minOccurs="0"/>

     <!-- used in the answer -->
     <xs:element name="Found" type="xs:boolean"/>
 <!-- This should refer to a peer adv, but is instead a whole doc -->
 <xs:element name="PeerAdv" type="xs:string" minOccurs="0"/>
   </xs:sequence>
 </xs:complexType>
 

See Also:
PipeService, PipeServiceImpl, JXTA Protocols Specification : Pipe Binding Protocol

Nested Class Summary
 
Nested classes inherited from class net.jxta.protocol.PipeResolverMessage
PipeResolverMessage.MessageType
 
Constructor Summary
PipeResolverMsg()
           
PipeResolverMsg(Element root)
           
 
Method Summary
 Document getDocument(MimeMediaType encodeAs)
          Creates a document out of the message.
protected  void initialize(Element root)
          Initializes the message from a document.
 
Methods inherited from class net.jxta.protocol.PipeResolverMessage
addPeerID, getInputPeerAdv, getMessageType, getMsgType, getPeerIDs, getPipeID, getPipeType, isFound, setFound, setInputPeerAdv, setMsgType, setPipeID, setPipeType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipeResolverMsg

public PipeResolverMsg()

PipeResolverMsg

public PipeResolverMsg(Element root)
Method Detail

initialize

protected void initialize(Element root)
Initializes the message from a document.


getDocument

public Document getDocument(MimeMediaType encodeAs)
Creates a document out of the message.

Parameters:
encodeAs - The document representation format requested.
Returns:
the message as a document.

JXTA J2SE