All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.habanero.Collobject
java.lang.Object
|
+----ncsa.habanero.ModelObject
|
+----ncsa.habanero.Targetable
|
+----ncsa.habanero.Sharable
|
+----ncsa.habanero.Collobject
- public class Collobject
- extends Sharable
- implements ComponentWrapper
A Collobject generally wraps a previously invented application,
which exists in a frame. Since the Collobject is a Sharable, it
has its own Arbitrator. Generally, the Collobject creates a frame
to display the wrapped object, although if the object is already
a frame, the Collobject doesn't bother. We consider the wrapped
object to be a view on the Collobject, and it is possible for there
to be more than one (with different display attributes, for example)
-
frame
-
-
localSpec
-
-
nInitialStateStreamCount
- Variables to designate what stream numbers store the basic
information about the collobject.
-
nInputStreamCount
-
-
nOutputStreamCount
-
-
originator
-
-
props
-
-
socketList
-
-
views
-
-
Collobject()
-
-
Collobject(Sharable, Wrapped, Arbitrator, String, String)
-
-
Collobject(Sharable, Wrapped, Arbitrator, String, String, Properties)
-
-
AddSubModel(ModelObject, Object)
- Adds the given object as a child.
-
addView(Wrapped)
-
-
deliverEvent(Event)
-
-
finishCapture()
-
-
frame()
-
-
getCollobjectID()
-
-
getComponent()
-
-
getProperty(String)
-
-
getView()
-
-
getView(int)
-
-
initialView()
-
-
isInitialized()
-
-
key()
- My identifier is my key in my parent's table of children.
-
MakeSpecifierSelf(Specifier)
- Adds the identifier for this object to the end of the Specifier.
-
originator()
-
-
performAction(Action)
- Keep any other action (particularly dumping) from happening while
this is.
-
queryNextReplayStreams(String)
-
-
querySplitterInputStream(InputStream, String)
-
-
querySplitterMarshallInputStream(MarshallInput, String)
-
-
querySplitterMarshallOutputStream(MarshallOutput, String)
-
-
querySplitterOutputStream(OutputStream, String)
-
-
registerSocket(CaptureReplaySocket)
-
-
removeView(Wrapped)
-
-
setCollobjectID(int)
-
-
setFrame()
-
-
setProperties(Properties)
-
-
setProperty(String, String)
-
-
shutDown()
-
-
startCapture(Object, ObserverFactory)
-
-
toString()
-
views
protected Vector views
props
protected Properties props
socketList
protected transient Vector socketList
frame
protected transient HabaneroFrame frame
originator
protected transient SessionParticipant originator
localSpec
protected transient String localSpec
nInitialStateStreamCount
protected static final int nInitialStateStreamCount
- Variables to designate what stream numbers store the basic
information about the collobject. The streams are:
StateStream: nInitialStateStreamCount
Input from Router: nInputStreamCount
Output to Central Arbitrator: nOutputStreamCount
nInputStreamCount
protected static final int nInputStreamCount
nOutputStreamCount
protected static final int nOutputStreamCount
Collobject
public Collobject(Sharable parent,
Wrapped toWrap,
Arbitrator arb,
String origin,
String spec,
Properties props)
- Parameters:
- arb - the arbitrator
- Returns:
- In this case the object was instantiated elsewhere. The constructor
takes my supermodel, the wrapped object, and my arbitrator as arguments.
If a frame (window) needs to be created, that's called here.
Collobject
public Collobject(Sharable parent,
Wrapped toWrap,
Arbitrator arb,
String origin,
String spec)
Collobject
public Collobject()
- Returns:
- creates a Collobject which will then be marshalled
initialView
protected Wrapped initialView()
- Returns:
- This is the first view set by the constructor.
MakeSpecifierSelf
public Specifier MakeSpecifierSelf(Specifier inSpecifier)
- Adds the identifier for this object to the end of the Specifier.
- Overrides:
- MakeSpecifierSelf in class ModelObject
key
public Object key()
- My identifier is my key in my parent's table of children.
- Overrides:
- key in class ModelObject
setProperties
public void setProperties(Properties p)
setProperty
public void setProperty(String key,
String property)
getProperty
public String getProperty(String key)
setFrame
protected void setFrame()
- Returns:
- Sets my frame variable by either creating a new frame or using
the wrapped object. If the wrapped object is a frame, it must
implement the HabaneroFrame interface, which allows it to send actions
to other applications.
frame
public HabaneroFrame frame()
- Returns:
- the frame
originator
public SessionParticipant originator()
- Returns:
- the originator
performAction
public void performAction(Action action)
- Keep any other action (particularly dumping) from happening while
this is.
- Overrides:
- performAction in class Targetable
deliverEvent
public boolean deliverEvent(Event event)
- Parameters:
- event - the event
- Returns:
- Deliver an AWT Event to all of the views until one of them accepts it.
returns true if it is accepted
- Overrides:
- deliverEvent in class Targetable
toString
public String toString()
- Returns:
- A string representation, for debugging.
- Overrides:
- toString in class Object
getComponent
public Component getComponent()
getView
public Wrapped getView()
- Returns:
- return the first (and presumably only) view of this object.
getView
public Wrapped getView(int whichOne)
- Returns:
- return a view of this object.
AddSubModel
protected synchronized void AddSubModel(ModelObject inObject,
Object key)
- Adds the given object as a child.
- Overrides:
- AddSubModel in class ModelObject
addView
public void addView(Wrapped inObject)
- Parameters:
- inObject - the new view of this object
- Returns:
- Add a view of this object
removeView
public void removeView(Wrapped inObject)
- Parameters:
- inObject - the old view
- Returns:
- Remove a view of this object
shutDown
public void shutDown()
- Returns:
- eliminates all the views of the object
- Overrides:
- shutDown in class Sharable
isInitialized
public boolean isInitialized()
startCapture
public boolean startCapture(Object key,
ObserverFactory newFactory)
- Parameters:
- key - the new key
- newFactory - the new factory that generates recording streams
- Returns:
- true if we are able to start recording (first
thing recorded is the state of the collobject)
finishCapture
public void finishCapture()
- Returns:
- stop capturing data
registerSocket
public void registerSocket(CaptureReplaySocket habSock)
- Parameters:
- habSock - the socket that we are registering
- Returns:
- keeps a list of this socket and starts it recording if the collobject
is alrady being read
querySplitterMarshallOutputStream
public SplitterMOStr querySplitterMarshallOutputStream(MarshallOutput out,
String strTag)
- Parameters:
- out - the initial output stream
- strTag - the tag for the object
- Returns:
- a new splitter stream
querySplitterMarshallInputStream
public SplitterMIStr querySplitterMarshallInputStream(MarshallInput in,
String strTag)
- Parameters:
- in - the initial input stream
- strTag - the tag for the object
- Returns:
- a new splitter stream
querySplitterOutputStream
public SplitterOutStr querySplitterOutputStream(OutputStream out,
String strTag)
- Parameters:
- out - the initial output stream
- strTag - the tag for the object
- Returns:
- a new splitter stream
querySplitterInputStream
public SplitterInStr querySplitterInputStream(InputStream in,
String strTag)
- Parameters:
- in - the initial input stream
- strTag - the tag for the object
- Returns:
- a new splitter stream
queryNextReplayStreams
public TimedMergingInStr queryNextReplayStreams(String strTag) throws HabaneroException
- Returns:
- creates a time merged str containing the socket's last two inputs
- Throws: HabaneroException
- when unable to open any streams
setCollobjectID
public void setCollobjectID(int nID)
- Parameters:
- nID - the collobject's ID number (set when the tool is added
or loaded
- Returns:
- changes the internals
getCollobjectID
public int getCollobjectID()
- Returns:
- the collobject's ID number
All Packages Class Hierarchy This Package Previous Next Index