org.resilientedge.jockey.peerbridge
Interface PBPeerGroup

All Superinterfaces:
java.lang.Comparable
All Known Implementing Classes:
LoopbackPeerGroup, SimpSockPeerGroup

public interface PBPeerGroup
extends java.lang.Comparable

A definition of a group within a network that performs the join, leave, create and delete.

Version:
$Revision: 1.1.1.1 $
Author:
John Gardner

Method Summary
 void createGroup(PBPeerGroup newGroup)
          Create a new group as a subgroup.
 void destroyGroup(PBPeerGroup newGroup)
          Destroy a subgroup.
 PBPeerGroup fromPeerGroupToken(PeerGroupToken token)
          Return a reference to a peer group implementation, translated from a client side token.
 PBDirectory getDirectory()
          Return a reference to a directory which can browse this group
 PBMessenger getMessenger()
          Return a reference to a messenger capable of exchanging messages with peers in this peer group.
 void join()
          Join the group.
 void leave()
          Leave the group.
 PeerGroupToken toPeerGroupToken()
          Return a copy of this object translated to a client side token.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getMessenger

public PBMessenger getMessenger()
Return a reference to a messenger capable of exchanging messages with peers in this peer group.
Returns:
messenger

getDirectory

public PBDirectory getDirectory()
Return a reference to a directory which can browse this group
Returns:
directory

join

public void join()
          throws PBSecurityViolationException
Join the group.
Throws:
PBSecurityViolationException - Description of Exception

leave

public void leave()
Leave the group.

createGroup

public void createGroup(PBPeerGroup newGroup)
                 throws PBSecurityViolationException
Create a new group as a subgroup.
Parameters:
newGroup - Description of Parameter
Throws:
PBSecurityViolationException - Description of Exception

destroyGroup

public void destroyGroup(PBPeerGroup newGroup)
                  throws PBSecurityViolationException
Destroy a subgroup.
Parameters:
newGroup - Description of Parameter
Throws:
PBSecurityViolationException - Description of Exception

toPeerGroupToken

public PeerGroupToken toPeerGroupToken()
Return a copy of this object translated to a client side token.
Returns:
a PI PeerGroupToken

fromPeerGroupToken

public PBPeerGroup fromPeerGroupToken(PeerGroupToken token)
Return a reference to a peer group implementation, translated from a client side token. This must return an identical instance to the one that created the token; this implies a registry of peergroups and some sort of reference counting, or at least a way to reconstruct the group from the token.
Returns:
a PI PeerGroupToken


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.