com.xj.anylogic.engine
Class EventOriginator

java.lang.Object
  extended by com.xj.anylogic.engine.EventOriginator
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DynamicEvent, Event, Transition

public abstract class EventOriginator
extends java.lang.Object
implements java.io.Serializable

Base class for all constructs in AnyLogic modeling language that are able to schedule discrete events, like Event, DynamicEvent and Transition.
Memory: sizeof(Object) + 8 bytes = 22 bytes

Author:
XJ Technologies Company Ltd. www.anylogic.com
See Also:
Serialized Form

Method Summary
 void cancel()
          Deprecated. User should not call this method for events, call reset() instead
 ActiveObject getActiveObject()
          Returns the active object that owns the event originator.
 java.lang.String getFullName()
          Returns the name of the event originator prefixed by the full name of its active object.
abstract  java.lang.String getName()
          Returns the name of the event originator, i.e. the name of an event or a transition object specified by the user.
 double getRest()
          Returns the time remaining before the scheduled occurrence of the event, or Double.POSITIVE_INFINITY if the event is not scheduled.
 boolean isActive()
          Returns true if the event is currently scheduled by this event originator, false otherwise.
 void onDestroy()
          Discards the scheduled event, if any (deletes it from the engine).
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public abstract java.lang.String getName()
Returns the name of the event originator, i.e. the name of an event or a transition object specified by the user.

Returns:
The name of the event originator.

getFullName

public java.lang.String getFullName()
Returns the name of the event originator prefixed by the full name of its active object.

Returns:
The full name of the event.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getActiveObject

public ActiveObject getActiveObject()
Returns the active object that owns the event originator.

Returns:
The active object owning this event originator.

isActive

public boolean isActive()
Returns true if the event is currently scheduled by this event originator, false otherwise.

Returns:
The status of the event.

getRest

public double getRest()
Returns the time remaining before the scheduled occurrence of the event, or Double.POSITIVE_INFINITY if the event is not scheduled.

Returns:
The time remaining before the occurrence of the event.

cancel

@Deprecated
public void cancel()
Deprecated. User should not call this method for events, call reset() instead

Cancels the scheduled event and clears the eventEntry


onDestroy

public void onDestroy()
Discards the scheduled event, if any (deletes it from the engine). Must be called when the active object is destroyed. We assume it is common behavior of all event originators



Copyright © 1991-2008 XJ Technlogies. All Rights Reserved.