Project JXTA

net.jxta.protocol
Class ResolverResponseMsg

java.lang.Object
  |
  +--net.jxta.protocol.ResolverResponseMsg

public abstract class ResolverResponseMsg
extends java.lang.Object

This class defines the Generic ResolverService message "Response" The default behavior of this abstract class is simply a place holder for the generic resolver response fields. note that no XML processing is performed by this class. The processing of the message is left to the class extending this class.

This message is part of the PeerGroup ResolverService Protocol

 <?xml version="1.0"?>
 <ResolverResponse>
   <handlername> name </handlername>
   <credentialServiecUri> uri </credentialServiecUri>
   <credentialToken> token </credentialToken>
   <queryid> id </queryid>
   <response> response </response>
 </ResolverResponse>

Note: queryid is unique to the originating node only, it can be utilized to match queries to responses

Since:
JXTA 1.0
See Also:
ResolverQueryMsg

Field Summary
static int queryid
           
 
Constructor Summary
ResolverResponseMsg()
           
 
Method Summary
static java.lang.String getAdvertisementType()
          All messages have a type (in xml this is !doctype) which identifies the message
 java.lang.String getCredentialServieUri()
          returns the credentialServiecUri name
 java.lang.String getCredentialToken()
          returns the credentialToken
abstract  Document getDocument(MimeMediaType asMimeType)
          Write advertisement into a document.
 java.lang.String getHandlerName()
          returns the handlername
 int getQueryId()
          returns queryid value
 java.lang.String getResponse()
          returns the query
 void setCredentialServiceUri(java.lang.String uri)
          set the credentialServiecUri
 void setCredentialToken(java.lang.String token)
          set the value of credentialToken
 void setHandlerName(java.lang.String name)
          set the handlername
 void setQueryId(int id)
          set the query id
 void setResponse(java.lang.String response)
          set the reponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queryid

public static int queryid
Constructor Detail

ResolverResponseMsg

public ResolverResponseMsg()
Method Detail

getAdvertisementType

public static java.lang.String getAdvertisementType()
All messages have a type (in xml this is !doctype) which identifies the message
Returns:
String type of the advertisement

getHandlerName

public java.lang.String getHandlerName()
returns the handlername
Returns:
String handlername name

getCredentialServieUri

public java.lang.String getCredentialServieUri()
returns the credentialServiecUri name
Returns:
String credentialServiecUri name

getCredentialToken

public java.lang.String getCredentialToken()
returns the credentialToken
Returns:
String value of the credentialToken

getQueryId

public int getQueryId()
returns queryid value
Returns:
int queryid value

getResponse

public java.lang.String getResponse()
returns the query
Returns:
String value of query

setHandlerName

public void setHandlerName(java.lang.String name)
set the handlername
Parameters:
name - string handlername

setCredentialServiceUri

public void setCredentialServiceUri(java.lang.String uri)
set the credentialServiecUri
Parameters:
uti - string credentialServiecUri

setCredentialToken

public void setCredentialToken(java.lang.String token)
set the value of credentialToken
Parameters:
token - string credentialToken

setQueryId

public void setQueryId(int id)
set the query id

setResponse

public void setResponse(java.lang.String response)
set the reponse
Parameters:
response - response String

getDocument

public abstract Document getDocument(MimeMediaType asMimeType)
                              throws java.lang.Exception
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

Project JXTA