org.ourgrid.corepeer
Interface CorePeer

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
CorePeerImpl, RestrictedCorePeerImpl

public interface CorePeer
extends java.rmi.Remote

Description: The core peer is the central peer of the OurGrid Community. When a peer wants to join the community, it contacts the CorePeer to inform its ID and URL and the CorePeer notifies the other community peers of the presence of a new peer.

Version:
1.0 Date27/09/2004

Method Summary
 java.util.List<ObjectID> getKnownPeers(ObjectID peerId)
          Returns a list of known peers in the OurGrid Community.
 java.util.List<ObjectID> hereIAm(ObjectID peerId)
          Called when a peer wants to join the OurGrid Community.
 void newPeerArrived(ObjectID peerID)
          Add a peer to knowPeers list.
 void removePeer(ObjectID objectID)
          Remove a peer from knowPeers list.
 void shutdown()
          Shutdown a core peer.
 

Method Detail

hereIAm

java.util.List<ObjectID> hereIAm(ObjectID peerId)
                                 throws java.rmi.RemoteException
Called when a peer wants to join the OurGrid Community.

Parameters:
peerId - The id of the caller peer.
Returns:
the list of already known peers (including the caller peer).
Throws:
java.rmi.RemoteException - If cannot contact the core peer.

getKnownPeers

java.util.List<ObjectID> getKnownPeers(ObjectID peerId)
                                       throws java.rmi.RemoteException
Returns a list of known peers in the OurGrid Community.

Parameters:
peerId - The identification of the caller "peer".
Returns:
The list of already known peers.
Throws:
java.rmi.RemoteException - If cannot contact the core peer.

shutdown

void shutdown()
              throws java.rmi.RemoteException
Shutdown a core peer. It will stop running threads and also prepare this object to be unbided.

Throws:
java.rmi.RemoteException - If cannot contact the core peer.

removePeer

void removePeer(ObjectID objectID)
                throws java.rmi.RemoteException
Remove a peer from knowPeers list.

Parameters:
objectID - informations about the peer
Throws:
java.rmi.RemoteException - If cannot contact the core peer.

newPeerArrived

void newPeerArrived(ObjectID peerID)
                    throws java.rmi.RemoteException
Add a peer to knowPeers list.

Parameters:
peerID - informations about the peer
Throws:
java.rmi.RemoteException - If cannot contact the core peer.