org.ourgrid.common.spec
Class RequestSpec

java.lang.Object
  extended by org.ourgrid.common.spec.RequestSpec
All Implemented Interfaces:
java.io.Serializable

public class RequestSpec
extends java.lang.Object
implements java.io.Serializable

The class represents a request made by a consumer. It stores information about a request.

See Also:
Serialized Form

Nested Class Summary
static class RequestSpec.RequestSource
          Indicates the request source (from local brokers or from remote peers).
 
Constructor Summary
RequestSpec(long requestID, java.lang.String requirements, int maxNumberOfGums, GumpClient gumpClient)
          Default constructor.
 
Method Summary
 GumpClient getGumpClient()
           
 long getID()
           
 ObjectID getObjectID()
          Gets the ObjectID representing the GumpClient responsible for this request.
 int getRequiredGums()
           
 java.lang.String getRequirements()
           
 RequestSpec.RequestSource getSource()
           
 boolean isFromALocalBroker()
           
 boolean isFromARemotePeer()
           
 void setAsFromLocalBroker()
           
 void setAsFromRemotePeer()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestSpec

public RequestSpec(long requestID,
                   java.lang.String requirements,
                   int maxNumberOfGums,
                   GumpClient gumpClient)
Default constructor.

Parameters:
requestID - request's identifier.
requirements - represents the expression that must be satisfied by processor.
maxNumberOfGums - number of processors requested. Integer.MAX_VALUE is unlimited number of processors.
gumpClient - a reference to the consumer
Method Detail

getObjectID

public ObjectID getObjectID()
Gets the ObjectID representing the GumpClient responsible for this request.

Returns:
the cached object identification of the consumer

getID

public long getID()

getRequirements

public java.lang.String getRequirements()

getRequiredGums

public int getRequiredGums()

getGumpClient

public GumpClient getGumpClient()

getSource

public RequestSpec.RequestSource getSource()

setAsFromLocalBroker

public void setAsFromLocalBroker()

setAsFromRemotePeer

public void setAsFromRemotePeer()

isFromALocalBroker

public boolean isFromALocalBroker()

isFromARemotePeer

public boolean isFromARemotePeer()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object