Project JXTA

net.jxta.impl.protocol
Class ResolverResponse

java.lang.Object
  extended by net.jxta.protocol.ResolverResponseMsg
      extended by net.jxta.impl.protocol.ResolverResponse

public class ResolverResponse
extends ResolverResponseMsg

ResolverResponse provides an implementation for ResolverResponseMsg using the standard JXTA Peer Resolver Protocol.

The message is implemented with the following schema:


 <xs:complexType name="ResolverResponse">
   <xs:all>
     <xs:element ref="jxta:Cred" minOccurs="0"/>
     <xs:element name="HandlerName" type="xs:string"/>
     <xs:element name="QueryID" type="xs:string"/>
     <xs:element name="Response" type="xs:anyType"/>
   </xs:all>
 </xs:complexType>

See Also:
JXTA Protocols Specification : Peer Resolver Protocol

Field Summary
 
Fields inherited from class net.jxta.protocol.ResolverResponseMsg
queryid
 
Constructor Summary
ResolverResponse()
          Standard Constructor for new instances.
ResolverResponse(Element root)
          Construct from a StructuredDocument
ResolverResponse(String HandlerName, StructuredDocument Credential, int QueryId, String Response)
          Deprecated. use the individual accessor methods instead.
 
Method Summary
 Document getDocument(MimeMediaType asMimeType)
          
 RouteAdvertisement getSrcPeerRoute()
          Get optional route information that may be attached to the response.
 void readIt(TextElement doc)
           
 void setSrcPeerRoute(RouteAdvertisement route)
          Set optional route information as part of the response.
 String toString()
          

Result is the response as an XML string.

 
Methods inherited from class net.jxta.protocol.ResolverResponseMsg
getAdvertisementType, getCredential, getHandlerName, getQueryId, getResponse, setCredential, setHandlerName, setQueryId, setResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResolverResponse

public ResolverResponse()
Standard Constructor for new instances.


ResolverResponse

public ResolverResponse(String HandlerName,
                        StructuredDocument Credential,
                        int QueryId,
                        String Response)
Deprecated. use the individual accessor methods instead.

Construct a doc from strings


ResolverResponse

public ResolverResponse(Element root)
Construct from a StructuredDocument

Method Detail

readIt

public void readIt(TextElement doc)

getDocument

public Document getDocument(MimeMediaType asMimeType)

Specified by:
getDocument in class ResolverResponseMsg

toString

public String toString()

Result is the response as an XML string.

Overrides:
toString in class Object

setSrcPeerRoute

public void setSrcPeerRoute(RouteAdvertisement route)
Set optional route information as part of the response. This information is just attached to the response and will not be sent as part of the response

Specified by:
setSrcPeerRoute in class ResolverResponseMsg
Parameters:
route - RouteAdvertisement to send the response

getSrcPeerRoute

public RouteAdvertisement getSrcPeerRoute()
Get optional route information that may be attached to the response. This information is just attached to the response and will not be sent as part of the response

Specified by:
getSrcPeerRoute in class ResolverResponseMsg
Returns:
RouteAdvertisement to send the response

JXTA J2SE