org.ourgrid.mygrid.scheduler.gump
Class GumpClientImpl

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by org.ourgrid.common.rmi.OurgridUnicastRemoteObject
                  extended by org.ourgrid.mygrid.scheduler.gump.GumpClientImpl
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, GumpClient

public class GumpClientImpl
extends OurgridUnicastRemoteObject
implements GumpClient

The GridMachineConsumer remote object responsible for receiving RMI calls and translating them to calls on the EBSchedulerFacade.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
GumpClientImpl(EBSchedulerFacade ebSchedulerFacade)
          The constructor.
GumpClientImpl(EBSchedulerFacade ebSchedulerFacade, MGSecureClientSocketFactory secureClientSocketFactory, MGSecureServerSocketFactory secureServerSocketFactory, int securePort)
          The constructor with SecureSocketFactories.
 
Method Summary
 ObjectID getObjectID()
          Returns the Identification object related to this GumpClient.
 void hereIsGum(GumResponseEntry gumResponseEntry)
           Delivers a grid machine (Gum) to this consumer.
 
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
 

Constructor Detail

GumpClientImpl

public GumpClientImpl(EBSchedulerFacade ebSchedulerFacade)
               throws java.rmi.RemoteException
The constructor.

Parameters:
ebSchedulerFacade - The EBSchedulerFacade
Throws:
java.rmi.RemoteException - When this remote object could not be created and exported

GumpClientImpl

public GumpClientImpl(EBSchedulerFacade ebSchedulerFacade,
                      MGSecureClientSocketFactory secureClientSocketFactory,
                      MGSecureServerSocketFactory secureServerSocketFactory,
                      int securePort)
               throws java.rmi.RemoteException
The constructor with SecureSocketFactories.

Parameters:
ebSchedulerFacade - The EBSchedulerFacade.
secureClientSocketFactory - The SecureClientSocketFactory.
secureServerSocketFactory - The SecureServerSocketFactory.
securePort - The port where the secure services will be bound.
Throws:
java.rmi.RemoteException
Method Detail

hereIsGum

public void hereIsGum(GumResponseEntry gumResponseEntry)
Description copied from interface: GumpClient

Delivers a grid machine (Gum) to this consumer. The grid machine satisfies the requirements of a specific request made by this consumer. The respective request is informed through a requestID which travels inside the parameter of type GumResponseEntry, which also contains a reference to the Gum, a gum specification (GumSpec) and a ID of the grid machine provider.

The grid machine availability has no guarantees. It may become unavailable due to failures or to the provider's will. For example, the provider may decide to schedule the grid machine to another consumer.

Also, it is expected that the consumer releases the Gum when it does not need it anymore. To do this the consumer must invoke the method Gump.finishRequestGums() .

Specified by:
hereIsGum in interface GumpClient
Parameters:
gumResponseEntry - an object containing the information about the delivery. It contains a reference to the Gum, a gum specification (GumSpec) and a ID of the grid machine provider.

getObjectID

public ObjectID getObjectID()
Description copied from interface: GumpClient
Returns the Identification object related to this GumpClient.

Specified by:
getObjectID in interface GumpClient
Returns:
the consumer identification.
See Also:
GumpClient.getObjectID()