Project JXTA

net.jxta.protocol
Class RouteResponseMsg

java.lang.Object
  extended bynet.jxta.protocol.RouteResponseMsg

public abstract class RouteResponseMsg
extends Object

This class defines the EndpointRouter RouteResponse message The default behavior of this abstract class is simply a This message is part of the Endpoint Routing Protocol.

      <?xml version="1.0" standalone='yes'?>
       <jxta:ERR>
        <Dst>Route adv response</Dst>
        <Src>Route adv of the responder's src</Src>
       </jxta:ERR>
 

See Also:
RouteQueryMsg

Constructor Summary
RouteResponseMsg()
           
 
Method Summary
static String getAdvertisementType()
          All messages have a type (in xml this is !
 RouteAdvertisement getDestRoute()
          returns the destination route we were looking for
abstract  Document getDocument(MimeMediaType asMimeType)
          Write advertisement into a document. asMimeType is a mime media-type specification and provides the form of the document which is being requested.
 RouteAdvertisement getSrcRoute()
          returns the route of the src peer that responded
 void setDestRoute(RouteAdvertisement dst)
          set the destination route we were looking for
 void setSrcRoute(RouteAdvertisement route)
          set the Route advertisement of the source peer that is originating the query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RouteResponseMsg

public RouteResponseMsg()
Method Detail

getAdvertisementType

public static String getAdvertisementType()
All messages have a type (in xml this is !doctype) which identifies the message

Returns:
String "jxta:ERR"

setDestRoute

public void setDestRoute(RouteAdvertisement dst)
set the destination route we were looking for

Parameters:
dst - destination route

getDestRoute

public RouteAdvertisement getDestRoute()
returns the destination route we were looking for

Returns:
route destination route advertisement

setSrcRoute

public void setSrcRoute(RouteAdvertisement route)
set the Route advertisement of the source peer that is originating the query

Parameters:
route - RouteAdvertisement of the source

getSrcRoute

public RouteAdvertisement getSrcRoute()
returns the route of the src peer that responded

Returns:
route RouteAdvertisement of the source peer that responded to the query

getDocument

public abstract Document getDocument(MimeMediaType asMimeType)
Write advertisement into a document. asMimeType is a mime media-type specification and provides the form of the document which is being requested. Two standard document forms are defined. "text/text" encodes the document in a form nice for printing out, and "text/xml" which provides an XML representation.

Parameters:
asMimeType - mime-type format requested
Returns:
Document representation of the document as an advertisement

JXTA J2SE