org.ourgrid.common.gump
Interface GumpClient

All Superinterfaces:
java.rmi.Remote
All Known Subinterfaces:
RemoteAccess
All Known Implementing Classes:
BindableMockGumpClientWrapper, FakeGumpClient, GumpClientImpl, RemoteAccessImpl, RemoteFakeGumpClient

public interface GumpClient
extends java.rmi.Remote

Represents a grid consumer that wants to use grid machines. This consumer gains access to grid machines through a grid machines provider. These two entities, grid machines and providers, are represented, respectively, by Gum and Gump instances.

To request grid machines, an instance of GumClient uses the Gump.requestGums() method. The provider then calls back the consumer to deliver Gum instances through a set of invocations of hereIsGum().

This interface is part of the core interfaces of the OurGrid project, along with Gum and Gump. They define a general way of getting access to and use machines on a grid, abstracting differences on doing so.


Method Summary
 ObjectID getObjectID()
          Returns the Identification object related to this GumpClient.
 void hereIsGum(GumResponseEntry gumResponseEntry)
           Delivers a grid machine (Gum) to this consumer.
 

Method Detail

hereIsGum

void hereIsGum(GumResponseEntry gumResponseEntry)
               throws java.rmi.RemoteException

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() .

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.
Throws:
java.rmi.RemoteException - if some RMI error occurs during the method invocation.

getObjectID

ObjectID getObjectID()
                     throws java.rmi.RemoteException
Returns the Identification object related to this GumpClient.

Returns:
the consumer identification.
Throws:
java.rmi.RemoteException - if some RMI error occurs during the method invocation.