Project JXTA

net.jxta.protocol
Class ResolverSrdiMsg

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

public abstract class ResolverSrdiMsg
extends Object

ResolverSrdiMsg is generic resolver wrapper for Services that wish to implement their own distribution of indices. this message provides the scoping within the group, and service. In addition it also defines a credential which should be verified by the service.


Constructor Summary
ResolverSrdiMsg()
           
 
Method Summary
 Credential getCredential()
          returns the credential
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.
 String getHandlerName()
          returns the handlername
static String getMessageType()
          All messages have a type (in xml this is !
 String getPayload()
          returns the payload
 void setCredential(Credential cred)
          set the credential object
 void setHandlerName(String name)
          set the handlername
 void setPayload(String payload)
          set the SRDI payload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResolverSrdiMsg

public ResolverSrdiMsg()
Method Detail

getMessageType

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

Returns:
String type of the advertisement

getHandlerName

public String getHandlerName()
returns the handlername

Returns:
String handlername name

getCredential

public Credential getCredential()
returns the credential

Returns:
StructuredDocument credential

getPayload

public String getPayload()
returns the payload

Returns:
String value of query

setHandlerName

public void setHandlerName(String name)
set the handlername

Parameters:
name - string handlername

setCredential

public void setCredential(Credential cred)
set the credential object

Parameters:
cred - credential

setPayload

public void setPayload(String payload)
set the SRDI payload

Parameters:
payload - The new payload value

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 format.

Parameters:
asMimeType - mime-type representation requested for that document
Returns:
Document document representing the advertisement

JXTA J2SE