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)


Variable Index

 o frame
 o localSpec
 o nInitialStateStreamCount
Variables to designate what stream numbers store the basic information about the collobject.
 o nInputStreamCount
 o nOutputStreamCount
 o originator
 o props
 o socketList
 o views

Constructor Index

 o Collobject()
 o Collobject(Sharable, Wrapped, Arbitrator, String, String)
 o Collobject(Sharable, Wrapped, Arbitrator, String, String, Properties)

Method Index

 o AddSubModel(ModelObject, Object)
Adds the given object as a child.
 o addView(Wrapped)
 o deliverEvent(Event)
 o finishCapture()
 o frame()
 o getCollobjectID()
 o getComponent()
 o getProperty(String)
 o getView()
 o getView(int)
 o initialView()
 o isInitialized()
 o key()
My identifier is my key in my parent's table of children.
 o MakeSpecifierSelf(Specifier)
Adds the identifier for this object to the end of the Specifier.
 o originator()
 o performAction(Action)
Keep any other action (particularly dumping) from happening while this is.
 o queryNextReplayStreams(String)
 o querySplitterInputStream(InputStream, String)
 o querySplitterMarshallInputStream(MarshallInput, String)
 o querySplitterMarshallOutputStream(MarshallOutput, String)
 o querySplitterOutputStream(OutputStream, String)
 o registerSocket(CaptureReplaySocket)
 o removeView(Wrapped)
 o setCollobjectID(int)
 o setFrame()
 o setProperties(Properties)
 o setProperty(String, String)
 o shutDown()
 o startCapture(Object, ObserverFactory)
 o toString()

Variables

 o views
 protected Vector views
 o props
 protected Properties props
 o socketList
 protected transient Vector socketList
 o frame
 protected transient HabaneroFrame frame
 o originator
 protected transient SessionParticipant originator
 o localSpec
 protected transient String localSpec
 o 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

 o nInputStreamCount
 protected static final int nInputStreamCount
 o nOutputStreamCount
 protected static final int nOutputStreamCount

Constructors

 o 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.
 o Collobject
 public Collobject(Sharable parent,
                   Wrapped toWrap,
                   Arbitrator arb,
                   String origin,
                   String spec)
 o Collobject
 public Collobject()
Returns:
creates a Collobject which will then be marshalled

Methods

 o initialView
 protected Wrapped initialView()
Returns:
This is the first view set by the constructor.
 o MakeSpecifierSelf
 public Specifier MakeSpecifierSelf(Specifier inSpecifier)
Adds the identifier for this object to the end of the Specifier.

Overrides:
MakeSpecifierSelf in class ModelObject
 o key
 public Object key()
My identifier is my key in my parent's table of children.

Overrides:
key in class ModelObject
 o setProperties
 public void setProperties(Properties p)
 o setProperty
 public void setProperty(String key,
                         String property)
 o getProperty
 public String getProperty(String key)
 o 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.
 o frame
 public HabaneroFrame frame()
Returns:
the frame
 o originator
 public SessionParticipant originator()
Returns:
the originator
 o performAction
 public void performAction(Action action)
Keep any other action (particularly dumping) from happening while this is.

Overrides:
performAction in class Targetable
 o 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
 o toString
 public String toString()
Returns:
A string representation, for debugging.
Overrides:
toString in class Object
 o getComponent
 public Component getComponent()
 o getView
 public Wrapped getView()
Returns:
return the first (and presumably only) view of this object.
 o getView
 public Wrapped getView(int whichOne)
Returns:
return a view of this object.
 o AddSubModel
 protected synchronized void AddSubModel(ModelObject inObject,
                                         Object key)
Adds the given object as a child.

Overrides:
AddSubModel in class ModelObject
 o addView
 public void addView(Wrapped inObject)
Parameters:
inObject - the new view of this object
Returns:
Add a view of this object
 o removeView
 public void removeView(Wrapped inObject)
Parameters:
inObject - the old view
Returns:
Remove a view of this object
 o shutDown
 public void shutDown()
Returns:
eliminates all the views of the object
Overrides:
shutDown in class Sharable
 o isInitialized
 public boolean isInitialized()
 o 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)
 o finishCapture
 public void finishCapture()
Returns:
stop capturing data
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o getCollobjectID
 public int getCollobjectID()
Returns:
the collobject's ID number

All Packages  Class Hierarchy  This Package  Previous  Next  Index