All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.habanero.NewCollobjectAction
java.lang.Object
|
+----ncsa.habanero.HabaneroAction
|
+----ncsa.habanero.NewCollobjectAction
- public class NewCollobjectAction
- extends HabaneroAction
- implements ArbitratorAction
The NewCollobjectAction is generated by a client when a user adds
a new Collobject to a session. It is sent to the Arbitrator, which,
because the NewCollobjectAction implements the ArbitratorAction interface,
calls actAtArbitrator on it.
-
collobCounter
-
-
nextAction
-
-
props
-
-
NewCollobjectAction()
-
-
NewCollobjectAction(Properties)
-
-
NewCollobjectAction(String, ComponentAction)
- Initialize the NewCollobjectAction with the name of the Collobject it
should initiate and a CentralArbitrator.
-
act(Targetable)
- Since this particular action is supposed to act only at the Arbitrator,
this method should not be called.
-
actAtArbitrator(Arbitrator, Specifiable)
- At the Arbitrator, we make a Collobject of the specified type with
an Arbitrator of the specified type.
-
announce(Arbitrator, Specifiable, boolean, String)
-
-
createArbitrator(Arbitrator, String)
-
-
createPort(Collobject, CentralArbitrator)
-
-
describe()
-
-
getProperty(String)
-
-
sendToEveryone()
-
-
setProperties(Properties)
-
-
setProperty(String, String)
-
props
protected Properties props
nextAction
protected ComponentAction nextAction
collobCounter
protected static int collobCounter
NewCollobjectAction
public NewCollobjectAction(Properties p)
- Parameters:
- collobName - the name of the new collobject
- arbitratorName - the name of the arbitrator
- add - whether this needs a specific stream
- Returns:
- Initialize the NewCollobjectAction with the name of the Collobject it
should initiate and the type of Arbitrator the Collobject should have.
NewCollobjectAction
public NewCollobjectAction(String collobName,
ComponentAction next)
- Initialize the NewCollobjectAction with the name of the Collobject it
should initiate and a CentralArbitrator.
NewCollobjectAction
public NewCollobjectAction()
setProperties
public void setProperties(Properties p)
setProperty
public void setProperty(String key,
String property)
getProperty
public String getProperty(String key)
act
public void act(Targetable target)
- Since this particular action is supposed to act only at the Arbitrator,
this method should not be called.
- Overrides:
- act in class HabaneroAction
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 is identical to that in
* ncsa.habanero.replay.DistributedReplayEngine, should this change,
* that code should too!!
sendToEveryone
public boolean sendToEveryone()
describe
public String describe()
- Returns:
- a description of NewCollobjectAction
- Overrides:
- describe in class HabaneroAction
createArbitrator
protected CentralArbitrator createArbitrator(Arbitrator arb,
String arbitratorName) throws InstantiationException, IllegalAccessException, IOException, ClassNotFoundException
- Parameters:
- arb - the arbitrator handling this request
- arbitratorName - the name of the arbitrator
- Returns:
- creates the arbitrator
- Throws: InstantiationException
- can't create the arbitrator
- Throws: IllegalAccessException
- can't create the arbitrator
- Throws: IOException
- can't create a replay arbitrator
- Throws: ClassNotFoundException
- file isn't compiled
createPort
protected boolean createPort(Collobject c,
CentralArbitrator collarb) throws IOException
- Parameters:
- c - the collobject
- collarb - the new arbitrator
- Returns:
- creates the connection and returns the port number
- Throws: can't
- create a multicast server
announce
protected void announce(Arbitrator arb,
Specifiable target,
boolean newListener,
String uniqueName)
- Parameters:
- arb - the arbitrator that is handling this request
- target - the target
- portNum - the number of the port
- Returns:
- announces to the world that a new collobject is created
All Packages Class Hierarchy This Package Previous Next Index