All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.habanero.granted.ActionGranted

java.lang.Object
   |
   +----java.util.EventObject
           |
           +----java.awt.AWTEvent
                   |
                   +----ncsa.habanero.ServerMessage
                           |
                           +----ncsa.habanero.granted.ActionGranted

public class ActionGranted
extends ServerMessage
implements Describable
The ActionGranted is a wrapper class which is created by the Arbitrator after it has determined that an Action is allowable. It is the class which is actually routed to the other clients. It contains the Action to be executed and the Ticket which determined when the Action can be executed


Variable Index

 o action
 o ticket

Constructor Index

 o ActionGranted(Action, Ticket, Specifiable)
Create the ActionGranted.
 o ActionGranted(ActionRequest, Ticket, Specifiable)
Create the ActionGranted.

Method Index

 o describe()
 o dispatch()
The Serializer calls this method to send the action to the target
 o getAction()
 o getTicket()
Return the ticket object
 o inOrder()
 o inPast()
 o isSerialized()
read the Ticket, then find the Arbitrator from its Specifier.
 o messageToSend(RequestHandler, Session)
 o toString()

Variables

 o action
 protected Action action
 o ticket
 protected Ticket ticket

Constructors

 o ActionGranted
 protected ActionGranted(ActionRequest req,
                         Ticket tk,
                         Specifiable arb)
Create the ActionGranted. Theoretically, only an Arbitrator can do this.

Parameters:
req - The Action is extracted from this ActionRequest
 o ActionGranted
 protected ActionGranted(Action ac,
                         Ticket tk,
                         Specifiable arb)
Create the ActionGranted. Theoretically, only an Arbitrator can do this. This constructor is used when a CentralArbitrator is directly creating new Actions to be propagated and therefore there is no request.

Parameters:
req - The Action is extracted from this ActionRequest

Methods

 o dispatch
 public void dispatch()
The Serializer calls this method to send the action to the target

Overrides:
dispatch in class ServerMessage
 o isSerialized
 public boolean isSerialized()
read the Ticket, then find the Arbitrator from its Specifier.

Overrides:
isSerialized in class ServerMessage
 o getTicket
 public Ticket getTicket()
Return the ticket object

Overrides:
getTicket in class ServerMessage
 o getAction
 public Action getAction()
Returns:
the action associated with this data
 o inOrder
 public boolean inOrder()
Returns:
true if this action's time is now
 o inPast
 public boolean inPast()
Returns:
true if the collobject has already processed this action
 o describe
 public String describe()
Returns:
a string that describes this object
 o toString
 public String toString()
Returns:
a string that represents the action granted
Overrides:
toString in class AWTEvent
 o messageToSend
 public ServerMessage messageToSend(RequestHandler toWhere,
                                    Session s)

All Packages  Class Hierarchy  This Package  Previous  Next  Index