p2ps.peer
Interface Peer

All Known Implementing Classes:
PeerImp

public interface Peer

A peer

Version:
$Revision: 295 $
Author:
Ian Wang

Method Summary
 AdvertisementFactory getAdvertisementFactory()
           
 Config getConfig()
           
 DiscoveryService getDiscoveryService()
           
 java.lang.String[] getGroupIDs()
           
 GroupService getGroupService()
           
 java.lang.String getIDPath()
           
 java.lang.String getPeerID()
           
 PipeService getPipeService()
           
 RendezvousService getRendezvousService()
           
 SecurityContext getSecurityContext()
           
 SecurityManager getSecurityManager()
           
 void init()
          Initialises the peer
 void init(GroupAdvertisement groupad, Peer parent)
          Initialises the peer to belong to the specified group
 

Method Detail

init

public void init()
          throws InitializationException,
                 java.io.IOException
Initialises the peer

Throws:
InitializationException
java.io.IOException

init

public void init(GroupAdvertisement groupad,
                 Peer parent)
          throws UnknownAuthorizationMechanismException,
                 AuthorizationException,
                 InitializationException,
                 java.io.IOException
Initialises the peer to belong to the specified group

Throws:
UnknownAuthorizationMechanismException
AuthorizationException
InitializationException
java.io.IOException

getPeerID

public java.lang.String getPeerID()
Returns:
the unique id for this peer

getGroupIDs

public java.lang.String[] getGroupIDs()
Returns:
the group id hierarchy for this peer (current group at index 0)

getIDPath

public java.lang.String getIDPath()
Returns:
the group and peer id hierarchy for this peer in the form groupid[0].groupid[1]...groupid[n].peerid

getConfig

public Config getConfig()
Returns:
the configuration for the peer

getSecurityContext

public SecurityContext getSecurityContext()
Returns:
the security context of the peer

getSecurityManager

public SecurityManager getSecurityManager()
Returns:
the security context for the specified URI

getAdvertisementFactory

public AdvertisementFactory getAdvertisementFactory()
Returns:
the advertisement factory

getDiscoveryService

public DiscoveryService getDiscoveryService()
Returns:
the discovery service

getRendezvousService

public RendezvousService getRendezvousService()
Returns:
the rendezvous service (null if not rendezvous)

getPipeService

public PipeService getPipeService()
Returns:
the pipe service

getGroupService

public GroupService getGroupService()
Returns:
the group service