org.ourgrid.corepeer
Class RestrictedCorePeerImpl
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.ourgrid.common.rmi.OurgridUnicastRemoteObject
org.ourgrid.corepeer.CorePeerImpl
org.ourgrid.corepeer.RestrictedCorePeerImpl
- All Implemented Interfaces:
- java.io.Serializable, java.rmi.Remote, CorePeer, CorePeerStatusProvider
public class RestrictedCorePeerImpl
- extends CorePeerImpl
- implements CorePeer, CorePeerStatusProvider
- See Also:
- Serialized Form
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary |
RestrictedCorePeerImpl()
Creates a CorePeer that can allow or not peers join the community. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
public static final long serialVersionUID
- Serial identification of the class. It need to be changed only if the
class interface is changed.
- See Also:
- Constant Field Values
ALLOWED_PEERS_FILE
public static final java.lang.String ALLOWED_PEERS_FILE
- File with a list of allowed peers.
- See Also:
- Constant Field Values
RestrictedCorePeerImpl
public RestrictedCorePeerImpl()
throws java.rmi.RemoteException
- Creates a CorePeer that can allow or not peers join the community.
- Throws:
java.rmi.RemoteException
- If cannot create this CorePeer.
hereIAm
public java.util.List<ObjectID> hereIAm(ObjectID peerId)
throws java.rmi.RemoteException
- Description copied from interface:
CorePeer
- Called when a peer wants to join the OurGrid Community.
- Specified by:
hereIAm
in interface CorePeer
- Overrides:
hereIAm
in class CorePeerImpl
- 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.- See Also:
CorePeer.hereIAm(ObjectID)
isAnAllowedPeer
public boolean isAnAllowedPeer(ObjectID peerId)
- Returns if the PeerId is allowed or not.
- Parameters:
peerId
- A PeerId.
- Returns:
true
case the PeerId is allowed,
false
otherwise.
getKnownPeers
public java.util.List<ObjectID> getKnownPeers(ObjectID peerId)
throws java.rmi.RemoteException
- Description copied from interface:
CorePeer
- Returns a list of known peers in the OurGrid Community.
- Specified by:
getKnownPeers
in interface CorePeer
- Overrides:
getKnownPeers
in class CorePeerImpl
- 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.