Project JXTA

net.jxta.protocol
Class RouteQueryMsg

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

public abstract class RouteQueryMsg
extends Object

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

See Also:
RouteResponseMsg

Constructor Summary
RouteQueryMsg()
           
 
Method Summary
static String getAdvertisementType()
          All messages have a type (in xml this is !
 Vector getBadHops()
          returns the bad hops know to that route
 PeerID getDestPeerID()
          returns the destination peer ID we are 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 issued the routequery
 void setBadHops(Vector hops)
          set the bad hops known into that route
 void setDestPeerID(PeerID pid)
          set the destination PeerID we are searching a route 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

RouteQueryMsg

public RouteQueryMsg()
Method Detail

getAdvertisementType

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

Returns:
String "jxta:ERQ"

setDestPeerID

public void setDestPeerID(PeerID pid)
set the destination PeerID we are searching a route for

Parameters:
pid - destination peerID

getDestPeerID

public PeerID getDestPeerID()
returns the destination peer ID we are looking for

Returns:
pid PeerID of the route destination

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 issued the routequery

Returns:
route RouteAdvertisement of the source peer

setBadHops

public void setBadHops(Vector hops)
set the bad hops known into that route

Parameters:
hops - RouteAdvertisement of the source

getBadHops

public Vector getBadHops()
returns the bad hops know to that route

Returns:
vector of bad hops for that route

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