Project JXTA

net.jxta.protocol
Class PeerInfoResponseMessage

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

public abstract class PeerInfoResponseMessage
extends Object

This abstract class define the PeerInfoService advertisement.


Constructor Summary
PeerInfoResponseMessage()
           
 
Method Summary
abstract  Document getDocument(MimeMediaType encodeAs)
           
static String getMessageType()
          returns the Message type
 Element getResponse()
          returns the response
 PeerID getSourcePid()
          returns the sender's pid
 PeerID getTargetPid()
          returns the target pid
 long getTimestamp()
          returns the time when this peer was last polled
 long getUptime()
          returns the number of milliseconds since this peer was started
 void setResponse(Element response)
          sets the request
 void setSourcePid(PeerID pid)
          sets the sender's pid
 void setTargetPid(PeerID pid)
          sets the target's pid
 void setTimestamp(long milliseconds)
          sets the time when this peer was last polled
 void setUptime(long milliseconds)
          sets the number of milliseconds since this peer was started
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeerInfoResponseMessage

public PeerInfoResponseMessage()
Method Detail

getMessageType

public static String getMessageType()
returns the Message type

Returns:
a string

getSourcePid

public PeerID getSourcePid()
returns the sender's pid

Returns:
a string representing the peer's id

setSourcePid

public void setSourcePid(PeerID pid)
sets the sender's pid

Parameters:
pid - a string representing a peer's id

getTargetPid

public PeerID getTargetPid()
returns the target pid

Returns:
a string representing the peer's id

setTargetPid

public void setTargetPid(PeerID pid)
sets the target's pid

Parameters:
pid - a string representing a peer's id

getResponse

public Element getResponse()
returns the response

Returns:
a structured document representing request

setResponse

public void setResponse(Element response)
sets the request

Parameters:
response - a structured document representing a peerinfo request

getUptime

public long getUptime()
returns the number of milliseconds since this peer was started

Returns:
the number of milliseconds

setUptime

public void setUptime(long milliseconds)
sets the number of milliseconds since this peer was started

Parameters:
milliseconds - the number of milliseconds since this peer was started

getTimestamp

public long getTimestamp()
returns the time when this peer was last polled

Returns:
long time in milliseconds when this peer was last polled in milliseconds since "the epoch", namely January 1, 1970, 00:00:00 GMT.

setTimestamp

public void setTimestamp(long milliseconds)
sets the time when this peer was last polled

Parameters:
milliseconds - time in milliseconds when this peer was last polled in milliseconds since "the epoch", namely January 1, 1970, 00:00:00 GMT.

getDocument

public abstract Document getDocument(MimeMediaType encodeAs)

JXTA J2SE