gov.nasa.arc.brahms.common.rt
Class ContainedInstanceCtx

java.lang.Object
  extended by gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx
      extended by gov.nasa.arc.brahms.common.rt.ContainedInstanceCtx
All Implemented Interfaces:
IBrahmsObjectCtx, IRuntimeConstants, java.io.Serializable

public class ContainedInstanceCtx
extends BrahmsObjectCtx

The ContainedInstanceCtx is the context managing a reference to an active instance that is contained by another active instance. The contained instance context defines when an active instance got contained by another active instance (start time) and when the contained active instance was disassociated with the carrying active instance. The reference to the active instance is defined through an active instance context.

Version:
1.0
Author:
Ron van Hoof
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface gov.nasa.arc.brahms.common.rt.IRuntimeConstants
ABORTED, ACTIVE, ACTIVITY, AVAILABLE, COMPLETED, CONSEQUENCE, DETECTABLE, ENDED, ENGINE, EXTERNAL_AGENT, FROM, IMPASSED, INITIAL, INTERRUPTED, JAVA_PROPERTY, sABORTED, sACTIVE, sAVAILABLE, sCOMPLETED, sENDED, sIMPASSED, sINTERRUPTED, sUNAVAILABLE, TO, TRANSFER, UNAVAILABLE
 
Constructor Summary
ContainedInstanceCtx(IActiveInstanceCtx container, IActiveInstanceCtx ci)
          Constructor, creates a new ContainedInstanceCtx
 
Method Summary
 IActiveInstanceCtx getContainedInstance()
          Returns the contained instance contained by the container
 IActiveInstanceCtx getContainer()
          Returns the container containing the contained instance
 void setContainedInstance(IActiveInstanceCtx containedInstance)
          Sets the contained instance contained by the container
 void setContainer(IActiveInstanceCtx container)
          Sets the container containing the contained instance
 
Methods inherited from class gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setContextFor, setEndTime, setID, setStartTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainedInstanceCtx

public ContainedInstanceCtx(IActiveInstanceCtx container,
                            IActiveInstanceCtx ci)
                     throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Constructor, creates a new ContainedInstanceCtx

Parameters:
container - the active instance containing the active instance
ci - the active instance contained by the container
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if container or active instance are null
Method Detail

setContainer

public void setContainer(IActiveInstanceCtx container)
                  throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the container containing the contained instance

Parameters:
container - the IActiveInstanceCtx being the container
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null container is specified

getContainer

public IActiveInstanceCtx getContainer()
                                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the container containing the contained instance

Returns:
IActiveInstanceCtx the container
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no container is specified

setContainedInstance

public void setContainedInstance(IActiveInstanceCtx containedInstance)
                          throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the contained instance contained by the container

Parameters:
containedInstance - the IActiveInstanceCtx being the contained instance
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null contained instance is specified

getContainedInstance

public IActiveInstanceCtx getContainedInstance()
                                        throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the contained instance contained by the container

Returns:
IActiveInstanceCtx the contained instance
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no contained instance is specified


Copyright © 1997-2012 All Rights Reserved.