|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SleeConnection
An application handle to a physical event-delivery connection to a SLEE. This interface is used by EJB components external to a SLEE to communicate with the SLEE's event routing subsystem. A SLEE vendor provides an implementation of this interface if they support external interoperability.
Instances of SleeConnection are created by an EJB application calling
SleeConnectionFactory.getConnection()
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.
SleeConnectionFactory,
ExternalActivityHandle| Method Summary | |
|---|---|
void |
close()
Closes this SleeConnection. |
ExternalActivityHandle |
createActivityHandle()
Creates a new external activity handle. |
void |
fireEvent(java.lang.Object event,
EventTypeID eventType,
ExternalActivityHandle handle,
Address address)
Fires an event on an external activity. |
EventTypeID |
getEventTypeID(java.lang.String name,
java.lang.String vendor,
java.lang.String version)
Retrieves an EventTypeID that identifies a particular SLEE event. |
| Method Detail |
|---|
ExternalActivityHandle createActivityHandle()
throws javax.resource.ResourceException
javax.resource.ResourceException - if this connection is closed, or an activity
handle could not be allocated due to a system-level failure.
EventTypeID getEventTypeID(java.lang.String name,
java.lang.String vendor,
java.lang.String version)
throws UnrecognizedEventException,
javax.resource.ResourceException
name - the event's namevendor - the event's vendorversion - the event's version
UnrecognizedEventException - if the SleeConnection determines
there is no corresponding event known to the SLEE.
javax.resource.ResourceException - if this connection is closed, or the
relevant EventTypeID could not be located due to a system-level
failure.
void fireEvent(java.lang.Object event,
EventTypeID eventType,
ExternalActivityHandle handle,
Address address)
throws java.lang.NullPointerException,
UnrecognizedActivityException,
UnrecognizedEventException,
javax.resource.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
null.
java.lang.NullPointerException - if event, eventType, or activityHandle are
null.
UnrecognizedEventException - if eventType is not a
valid SLEE event type.
UnrecognizedActivityException - if activityHandle is
not a valid external activity handle
javax.resource.ResourceException - if this connection is closed, or the event
could not be fired due to a system-level failure.
void close()
throws javax.resource.ResourceException
javax.resource.ResourceException - if this connection is already closed, or
could not be closed due to a system-level failure.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||