Package jsl.modeling.elements.station
Class Station
- java.lang.Object
-
- jsl.simulation.ModelElement
-
- jsl.simulation.SchedulingElement
-
- jsl.modeling.elements.station.Station
-
- All Implemented Interfaces:
ReceiveQObjectIfc
,ObservableIfc
,GetNameIfc
,IdentityIfc
- Direct Known Subclasses:
DelayStation
,NWayByChanceStationSender
,SingleQueueStation
,TwoWayByChanceStationSender
public abstract class Station extends SchedulingElement implements ReceiveQObjectIfc
A Station represents a location that can receive QObjects for processing. Sub-classes of Station must supply an implementation of the ReceiveQObjectIfc interface. A Station may or may not have a helper object that implements the SendQObjectIfc interface. If this helper object is supplied it will be used to send the processed QObject to its next location for processing. A Station may or may not have a helper object that implements the ReceiveQObjectIfc interface. If this helper object is supplied and the SendQObjectIfc helper is not supplied, then the object that implements the ReceiveQObjectIfc will be the next receiver for the QObject If neither helper object is supplied then a runtime exception will occur when trying to use the send() method
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jsl.simulation.ModelElement
ModelElement.EventBuilderIfc<T>, ModelElement.EventScheduler<T>, ModelElement.ModelElementComparator, ModelElement.RequestBuilder, ModelElement.RequestDurationIfc, ModelElement.RequestTimeIfc, ModelElement.RequestUsingIfc, ModelElement.TimedUpdateEventAction, ModelElement.TimeUnitIfc<T>, ModelElement.WarmUpEventAction
-
-
Field Summary
-
Fields inherited from class jsl.simulation.ModelElement
AFTER_EXPERIMENT, AFTER_REPLICATION, BEFORE_EXPERIMENT, BEFORE_REPLICATION, CONDITIONAL_ACTION_REGISTRATION, DEFAULT_TIMED_EVENT_PRIORITY, INITIALIZED, MONTE_CARLO, myAfterExperimentOption, myAfterReplicationOption, myBeforeExperimentOption, myBeforeReplicationOption, myInitializationOption, myLengthOfWarmUp, myModelElements, myMonteCarloOption, myObservableComponent, myReplicationEndedOption, myTimedUpdateActionListener, myTimedUpdateEvent, myTimedUpdateInterval, myTimedUpdateOption, myTimedUpdatePriority, myWarmUpActionListener, myWarmUpEvent, myWarmUpIndicator, myWarmUpOption, myWarmUpPriority, NONE, REMOVED_FROM_MODEL, REPLICATION_ENDED, TIME_UNIT_DAY, TIME_UNIT_HOUR, TIME_UNIT_MILLISECOND, TIME_UNIT_MINUTE, TIME_UNIT_SECOND, TIME_UNIT_WEEK, TIMED_UPDATE, UPDATE, WARMUP
-
-
Constructor Summary
Constructors Constructor Description Station(ModelElement parent)
Station(ModelElement parent, java.lang.String name)
Station(ModelElement parent, SendQObjectIfc sender, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReceiveQObjectIfc
getNextReceiver()
A Station may or may not have a helper object that implements the ReceiveQObjectIfc interface.SendQObjectIfc
getSender()
A Station may or may not have a helper object that implements the SendQObjectIfc interface.protected void
send(QObject qObj)
A Station may or may not have a helper object that implements the SendQObjectIfc interface.void
setNextReceiver(ReceiveQObjectIfc receiver)
A Station may or may not have a helper object that implements the ReceiveQObjectIfc interface.void
setSender(SendQObjectIfc sender)
A Station may or may not have a helper object that implements the SendQObjectIfc interface.-
Methods inherited from class jsl.simulation.SchedulingElement
cancelEvent, rescheduleEvent, rescheduleEvent, rescheduleEvent, rescheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent
-
Methods inherited from class jsl.simulation.ModelElement
addObserver, addObserverToModelElements, afterExperiment, afterExperiment_, afterReplication, afterReplication_, asString, beforeExperiment, beforeExperiment_, beforeReplication, beforeReplication_, buildEventGenerator, cancelTimedUpdateEvent, cancelWarmUpEvent, changeParentModelElement, checkForAfterExperiment, checkForAfterReplication, checkForBeforeExperiment, checkForBeforeReplication, checkForConditionalActionRegistration, checkForInitialize, checkForMonteCarlo, checkForRemoveFromModel, checkForReplicationEnded, checkForTimedUpdate, checkForUpdate, checkForWarmUp, checkObserverState, checkWarmUpOption, clearModelElementObservers, contains, countObservers, createEntity, createEntity, createQObject, day, deleteObserver, deleteObserverFromModelElements, deleteObservers, findModelElementWithWarmUpEvent, getAfterExperimentOption, getAfterReplicationOption, getAllCounters, getAllModelElements, getAllRandomElements, getAllResponseVariables, getAllVariables, getBeforeExperimentOption, getBeforeReplicationOption, getChildModelElementIterator, getCurrentReplicationNumber, getDefaultEntityType, getExecutive, getExperiment, getId, getInitializationOption, getInitializationOrderAsString, getLeftPreOrderTraversalCount, getLengthOfWarmUp, getModel, getModelElementCompartor, getModelElementsAsString, getModelElementsAsString, getModelElementsAsString, getMonteCarloOption, getName, getNumberOfModelElements, getObserverState, getParentModelElement, getPreviousObserverState, getReplicationEndedOption, getRightPreOrderTraversalCount, getSimulation, getSpatialModel, getStringLabel, getThisElementsCounters, getThisElementsModelElements, getThisElementsRandomVariables, getThisElementsResponseVariables, getThisElementsVariables, getTime, getTimedUpdateInterval, getTimedUpdateOption, getUpdateNotificationFlag, getVariable, getWarmUpEventTime, getWarmUpOption, hour, indent, initialize, initialize_, isTimedUpdateEventScheduled, isWarmedUp, isWarmUpEventScheduled, isWarmUpScheduled, millisecond, minute, montecarlo, montecarlo_, notifyAfterExperimentObservers, notifyAfterReplicationObservers, notifyBeforeExperimentObservers, notifyBeforeReplicationObservers, notifyConditionalActionRegistrationObservers, notifyInitializationObservers, notifyMonteCarloObservers, notifyObservers, notifyObservers, notifyRemovingFromModelObservers, notifyReplicationEndedObservers, notifyTimedUpdateObservers, notifyUpdateObservers, notifyWarmUpObservers, registerConditionalActions, registerConditionalActions_, removedFromModel, removeFromModel, replicationEnded, replicationEnded_, schedule, second, seize, setAfterExperimentOption, setAfterExperimentOptionForModelElements, setAfterReplicationOption, setAfterReplicationOptionForModelElements, setBeforeExperimentOption, setBeforeExperimentOptionForModelElements, setBeforeReplicationOption, setBeforeReplicationOptionForModelElements, setInitializationOption, setInitializationOptionForModelElements, setLengthOfWarmUp, setModel, setMonteCarloOption, setMonteCarloOptionForModelElements, setName, setObserverState, setParentModelElement, setReplicationEndedOption, setReplicationEndedOptionForModelElements, setSpatialModel, setStringLabel, setTimedUpdateInterval, setTimedUpdateOption, setTimedUpdateOptionForModelElements, setUpdateNotificationFlag, setWarmUpOption, setWarmUpOptionForModelElements, stopExecutive, stopExecutive, timedUpdate, timedUpdate_, toString, update, useControls, warmUp, warmUp_, week
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jsl.modeling.elements.station.ReceiveQObjectIfc
receive
-
-
-
-
Constructor Detail
-
Station
public Station(ModelElement parent)
- Parameters:
parent
- the parent model element
-
Station
public Station(ModelElement parent, java.lang.String name)
- Parameters:
parent
- the parent model elementname
- a unique name
-
Station
public Station(ModelElement parent, SendQObjectIfc sender, java.lang.String name)
- Parameters:
parent
- the parent model elementsender
- can be null, represents something that can send QObjectsname
- a unique name
-
-
Method Detail
-
getSender
public final SendQObjectIfc getSender()
A Station may or may not have a helper object that implements the SendQObjectIfc interface. If this helper object is supplied it will be used to send the processed QObject to its next location for processing.- Returns:
- the thing that will be used to send the completed QObject
-
setSender
public final void setSender(SendQObjectIfc sender)
A Station may or may not have a helper object that implements the SendQObjectIfc interface. If this helper object is supplied it will be used to send the processed QObject to its next location for processing.- Parameters:
sender
- the thing that will be used to send the completed QObject
-
getNextReceiver
public final ReceiveQObjectIfc getNextReceiver()
A Station may or may not have a helper object that implements the ReceiveQObjectIfc interface. If this helper object is supplied and the SendQObjectIfc helper is not supplied, then the object that implements the ReceiveQObjectIfc will be the next receiver for the QObject when using default send() method.- Returns:
- the thing that should receive the completed QObject, may be null
-
setNextReceiver
public final void setNextReceiver(ReceiveQObjectIfc receiver)
A Station may or may not have a helper object that implements the ReceiveQObjectIfc interface. If this helper object is supplied and the SendQObjectIfc helper is not supplied, then the object that implements the ReceiveQObjectIfc will be the next receiver for the QObject when using default send() method.- Parameters:
receiver
- the thing that should receive the completed QObject, may be null
-
send
protected void send(QObject qObj)
A Station may or may not have a helper object that implements the SendQObjectIfc interface. If this helper object is supplied it will be used to send the processed QObject to its next location for processing. A Station may or may not have a helper object that implements the ReceiveQObjectIfc interface. If this helper object is supplied and the SendQObjectIfc helper is not supplied, then the object that implements the ReceiveQObjectIfc will be the next receiver for the QObject If neither helper object is supplied then a runtime exception will occur when trying to use the send() method- Parameters:
qObj
- the completed QObject
-
-