public interface Event
Modifier and Type | Method and Description |
---|---|
void |
checkForTimeout()
Checks if the event or a parent event has timed out.
|
ErrorMessage |
createErrorMessage(int errorCode)
Creates a VHI defined error message without parameters.
|
ErrorMessage |
createErrorMessage(int errorCode,
java.lang.Object[] params)
Creates a VHI defined error message with parameters.
|
RemoteHostSession |
createHostSession()
Creates a new
RemoteHostSession object that can be used to
connect to a different model. |
ErrorMessage |
createUserErrorMessage(java.lang.String message)
Creates a user-defined error message.
|
java.util.List |
getEventStack()
Gets the stack of currently executing events.
|
java.lang.String |
getHandlerProperty(java.lang.String name)
Gets the value of the given handler property.
|
Logger |
getLogger()
Gets the logging interface used to make entries in the VHI log file.
|
boolean |
isDesignEnvironment()
Determines whether or not an event is being fired in a design
environment.
|
Logger getLogger()
Logger
interface must only be used within the event that
obtained it. No reference to the interface should exist upon returning
from the event.void checkForTimeout() throws EventTimeoutException
EventTimeoutException
exception.EventTimeoutException
- if the event or a parent event has timed
outjava.util.List getEventStack()
EventInfo
objectsjava.lang.String getHandlerProperty(java.lang.String name)
name
- property nameboolean isDesignEnvironment()
RemoteHostSession createHostSession()
RemoteHostSession
object that can be used to
connect to a different model. This object is NOT associated with
the event's host session. Instead, a connection to a different model
can be made via one of the various connect methods on
RemoteHostSession
.
The RemoteHostSession
interface is not thread safe, so care
must be taken in using it outside of the event that created it. To
avoid threading issues altogether, it should only be used within the
host session that created it.ErrorMessage createUserErrorMessage(java.lang.String message)
message
- ErrorMessage createErrorMessage(int errorCode)
errorCode
- the VHI error codejava.lang.IllegalArgumentException
- if the errorCode is invalidErrorMessage createErrorMessage(int errorCode, java.lang.Object[] params)
errorCode
- the VHI defined error codeparams
- the error message parameter valuesjava.lang.IllegalArgumentException
- if the errorCode is invalid or the
number of parameters for the error is incorrect