|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.impl.peer.PeerInfoService
Peer Info provides a mechanism to obtain information about peers.
Constructor Summary | |
PeerInfoService()
|
Method Summary | |
void |
flushAdvertisements(java.lang.String id)
flush cached advertisements. |
net.jxta.document.Advertisement |
getAdvertisement()
Returns the advertisement for that service. |
net.jxta.peergroup.PeerGroup |
getGroup()
Returns the group to which this service is attached. |
net.jxta.service.Service |
getInterface()
Service objects are not manipulated directly to protect usage of the service. |
java.util.Enumeration |
getLocalPeerInfo(java.lang.String peer)
Get PeerInfo from local cache. |
net.jxta.protocol.PeerInfoAdvertisement |
getPeerInfo()
Retrieve Peer Information Advertisement of localhost |
void |
getRemotePeerInfo(java.lang.String peer)
Get PeerInfo from a remote peer. |
void |
init(net.jxta.peergroup.PeerGroup group,
net.jxta.document.Advertisement sadv)
init is called by PeerGroup to init the Service |
net.jxta.protocol.ResolverResponseMsg |
processQuery(net.jxta.protocol.ResolverQueryMsg query)
Handler API method |
void |
pushResponse(net.jxta.protocol.ResolverResponseMsg response)
deal with incoming responses |
void |
registerService(net.jxta.protocol.ServiceAdvertisement advertisement)
Register a Service in the Peer Advertisement service adversement describes a specific service that is running on the peer (i.e. |
int |
startApp(java.lang.String[] arg)
Supply arguments and starts this service if it hadn't started by itself. |
void |
stopApp()
Ask this service to stop. |
void |
unRegisterService(net.jxta.protocol.ServiceAdvertisement advertisement)
unRegisters a prevously registered service |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public PeerInfoService()
Method Detail |
public int startApp(java.lang.String[] arg)
arg
- A table of strings arguments.public void stopApp()
public net.jxta.service.Service getInterface()
public net.jxta.document.Advertisement getAdvertisement()
public void init(net.jxta.peergroup.PeerGroup group, net.jxta.document.Advertisement sadv) throws net.jxta.exception.PeerGroupException
pg
- Peer Grouppublic net.jxta.protocol.PeerInfoAdvertisement getPeerInfo()
public void registerService(net.jxta.protocol.ServiceAdvertisement advertisement) throws java.io.IOException
advertisement
- service advertisement to be registeredpublic void unRegisterService(net.jxta.protocol.ServiceAdvertisement advertisement) throws java.io.IOException
advertisement
- service advertisement to be unregisteredpublic void getRemotePeerInfo(java.lang.String peer)
peer
- Address of a peer, or portal to connect to, if
address is nullpublic java.util.Enumeration getLocalPeerInfo(java.lang.String peer) throws java.io.IOException
peer
- Address of a peer. Can be null in which case locally
cached PeerInfoAdvertisements of all peers are returnedpublic net.jxta.peergroup.PeerGroup getGroup()
public net.jxta.protocol.ResolverResponseMsg processQuery(net.jxta.protocol.ResolverQueryMsg query) throws net.jxta.exception.NoResponseException
query
- ResolverQueryMsgpublic void pushResponse(net.jxta.protocol.ResolverResponseMsg response)
response
- public void flushAdvertisements(java.lang.String id) throws java.io.IOException
id
- peerId of peer whose locally cached adv is to be
deleted. If null, cached advs of all peers are deleted.
|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |