public interface SleeConnection
Instances of SleeConnection are created by an EJB application calling
Implementations may defer validation of arguments and detection of communication errors beyond the return of a method invocation. Clients of this interface should not depend on exceptions being thrown in the face of these errors.
|Modifier and Type||Method and Description|
Closes this SleeConnection.
Creates a new external activity handle.
Fires an event on an external activity.
Retrieves an EventTypeID that identifies a particular SLEE event.
ExternalActivityHandle createActivityHandle() throws ResourceException
ResourceException- if this connection is closed, or an activity handle could not be allocated due to a system-level failure.
EventTypeID getEventTypeID(String name, String vendor, String version) throws UnrecognizedEventException, ResourceException
name- the event's name
vendor- the event's vendor
version- the event's version
UnrecognizedEventException- if the SleeConnection determines there is no corresponding event known to the SLEE.
ResourceException- if this connection is closed, or the relevant EventTypeID could not be located due to a system-level failure.
void fireEvent(Object event, EventTypeID eventType, ExternalActivityHandle handle, Address address) throws NullPointerException, UnrecognizedActivityException, UnrecognizedEventException, ResourceException
event- the event to fire; must be serializable.
eventType- an EventTypeID from
getEventTypeID(java.lang.String, java.lang.String, java.lang.String)indicating the SLEE event type of the event being fired.
handle- an ExternalActivityHandle returned by
createActivityHandle()indicating the SLEE activity to fire the event on.
address- an optional address to use in event routing; may be
NullPointerException- if event, eventType, or activityHandle are
eventTypeis not a valid SLEE event type.
activityHandleis not a valid external activity handle
ResourceException- if this connection is closed, or the event could not be fired due to a system-level failure.
void close() throws ResourceException
ResourceException- if this connection is already closed, or could not be closed due to a system-level failure.