All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.habanero.NewArbitratorAction

java.lang.Object
   |
   +----ncsa.habanero.HabaneroAction
           |
           +----ncsa.habanero.NewArbitratorAction

public class NewArbitratorAction
extends HabaneroAction
implements ArbitratorAction
The NewArbitratorAction is generated by a client when a user adds a new Collobject to a session. It is sent to the Arbitrator, which, because the NewArbitratorAction implements the ArbitratorAction interface, calls actAtArbitrator on it.


Variable Index

 o addStream
 o arbitratorName
 o nCollobjectNumber

Constructor Index

 o NewArbitratorAction()
This should only be called if the next call will be a marshall()
 o NewArbitratorAction(String, int, boolean)

Method Index

 o act(Targetable)
Since this particular action is supposed to act only at the server, this method should not be called.
 o actAtArbitrator(Arbitrator, Specifiable)
At the Arbitrator, we make a Collobject of the specified type with an Arbitrator of the specified type.
 o describe()
 o sendToEveryone()

Variables

 o arbitratorName
 protected String arbitratorName
 o nCollobjectNumber
 protected int nCollobjectNumber
 o addStream
 protected boolean addStream

Constructors

 o NewArbitratorAction
 public NewArbitratorAction(String arbitratorName,
                            int nIndex,
                            boolean add)
Parameters:
arbitratorName - the name of the arbitrator
nIndex - the index of the collobject
add - whether this needs a specific stream
Returns:
Initialize the NewArbitratorAction with the name of the Collobject it should initiate and the type of Arbitrator the Collobject should have.
 o NewArbitratorAction
 public NewArbitratorAction()
This should only be called if the next call will be a marshall()

Methods

 o act
 public void act(Targetable target)
Since this particular action is supposed to act only at the server, this method should not be called.

Overrides:
act in class HabaneroAction
 o actAtArbitrator
 public void actAtArbitrator(Arbitrator arb,
                             Specifiable target)
At the Arbitrator, we make a Collobject of the specified type with an Arbitrator of the specified type. Since this is on a server, the Arbitrator must be of type CentralArbitrator. This is still kind of a HACK - we also need to specify whether a new Router should be created. Then we create a new action request, with an Action which asks the clients to create the same Collobject, and tells their DistributedArbitrators where to connect to. NOTE: THIS CODE SHOULD BE NEARLY IDENTICAL TO THE CODE FOR NewCollobjectAction!!!!

 o sendToEveryone
 public boolean sendToEveryone()
 o describe
 public String describe()
Returns:
a description of NewArbitratorAction
Overrides:
describe in class HabaneroAction

All Packages  Class Hierarchy  This Package  Previous  Next  Index