Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

net.jxta.impl.protocol
Class PipeResolverMsg  view PipeResolverMsg download PipeResolverMsg.java

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

public class PipeResolverMsg
extends net.jxta.protocol.PipeResolverMessage

This class implements net.jxta.protocol.PipeResolverMessage by providing initialize(Element) 55 and getDocument(MimeMediaType) 55 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>
 


Nested Class Summary
 
Nested classes inherited from class net.jxta.protocol.PipeResolverMessage
net.jxta.protocol.PipeResolverMessage.MessageType
 
Field Summary
private static java.lang.String AnswerMsgType
           
private static java.lang.String FoundTag
           
private static org.apache.log4j.Logger LOG
          Log4J Logger
private static java.lang.String MsgTypeTag
           
private static java.lang.String PeerAdvTag
           
private static java.lang.String PeerIdTag
           
private static java.lang.String PipeIdTag
           
private static java.lang.String PipeTypeTag
           
private static java.lang.String QueryMsgType
           
 
Fields inherited from class net.jxta.protocol.PipeResolverMessage
 
Constructor Summary
PipeResolverMsg()
           
PipeResolverMsg(net.jxta.document.Element root)
           
 
Method Summary
 net.jxta.document.Document getDocument(net.jxta.document.MimeMediaType encodeAs)
          Creates a document out of the message.
protected  void initialize(net.jxta.document.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
 

Field Detail

LOG

private static final transient org.apache.log4j.Logger LOG
Log4J Logger


MsgTypeTag

private static final java.lang.String MsgTypeTag
See Also:
Constant Field Values

PipeIdTag

private static final java.lang.String PipeIdTag
See Also:
Constant Field Values

PipeTypeTag

private static final java.lang.String PipeTypeTag
See Also:
Constant Field Values

PeerIdTag

private static final java.lang.String PeerIdTag
See Also:
Constant Field Values

PeerAdvTag

private static final java.lang.String PeerAdvTag
See Also:
Constant Field Values

FoundTag

private static final java.lang.String FoundTag
See Also:
Constant Field Values

QueryMsgType

private static final java.lang.String QueryMsgType
See Also:
Constant Field Values

AnswerMsgType

private static final java.lang.String AnswerMsgType
See Also:
Constant Field Values
Constructor Detail

PipeResolverMsg

public PipeResolverMsg()

PipeResolverMsg

public PipeResolverMsg(net.jxta.document.Element root)
Method Detail

initialize

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


getDocument

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