|
WebLogic Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.wlai.client.EventContext
A frame of reference for generating/receiving events. This class is used by ApplicationView to manage the event delivery mechanics in methods such as postEvent, addEventListener, etc.
Field Summary | |
static int |
JMS_QUEUE
|
static int |
JMS_TOPIC
|
Constructor Summary | |
protected |
EventContext()
Constructor for use by Java serialization framework. |
|
EventContext(java.lang.String sourceKey,
java.lang.String sourceType,
javax.naming.Context context,
java.lang.String jmsDestName,
int jmsDestType)
Get an EventContext object using the given JNDI context. |
|
EventContext(java.lang.String sourceKey,
java.lang.String sourceType,
javax.naming.Context context,
java.lang.String jmsDestName,
int jmsDestType,
boolean bTransaction)
Get an EventContext object using the given JNDI context. |
|
EventContext(java.lang.String sourceKey,
java.lang.String sourceType,
java.util.Hashtable jndiEnv,
java.lang.String jmsDestName,
int jmsDestType)
Get an EventContext object using the given JNDI context. |
|
EventContext(java.lang.String durableClientID,
java.lang.String sourceKey,
java.lang.String sourceType,
javax.naming.Context context,
java.lang.String jmsDestName)
Get an EventContext object using the given JNDI context. |
protected |
EventContext(java.lang.String durableClientID,
java.lang.String sourceKey,
java.lang.String sourceType,
javax.naming.Context context,
java.lang.String jmsDestName,
int jmsDestType)
|
|
EventContext(java.lang.String durableClientID,
java.lang.String sourceKey,
java.lang.String sourceType,
java.util.Hashtable jndiEnv,
java.lang.String jmsDestName)
Get an EventContext object using the given JNDI context. |
|
EventContext(javax.security.auth.Subject authUser,
java.lang.String sourceKey,
java.lang.String sourceType,
javax.naming.Context context,
java.lang.String jmsDestName,
int jmsDestType)
constructor for internal use |
Method Summary | |
void |
addListener(java.lang.String eventTypeName,
EventListener eventListener)
Register a listener for all events of type eventTypeName. |
void |
addListener(java.lang.String eventTypeName,
EventListener eventListener,
java.lang.String subscriberName)
Register a listener for all events of type eventTypeName. |
protected void |
checkClosed()
|
void |
close()
Close JMS resources. |
protected boolean |
compare(java.lang.Object obj1,
java.lang.Object obj2)
Helper method for comparing member variables, safe to pass null for either of the parameters. |
boolean |
containsListener(java.lang.String eventTypeName,
EventListener listener)
Has this EventContext already had EventListener given by listener register interest in events of type eventTypeName. |
boolean |
equals(java.lang.Object obj)
|
javax.naming.Context |
getContext()
Get the JNDI context being used. |
javax.jms.Queue |
getJMSQueue()
Deprecated. This method is no longer used due to internal refactoring. |
javax.jms.Topic |
getJMSTopic()
Deprecated. This method is no longer used due to internal refactoring. |
java.lang.String |
getSourceKey()
|
java.lang.String |
getSourceType()
|
protected void |
init(java.lang.String durableClientID,
java.lang.String sourceKey,
java.lang.String sourceType,
javax.naming.Context context,
java.lang.String jmsDestName,
int jmsDestType)
initialize the Object |
protected void |
initialize()
Initialize JMS. |
void |
postEvent(java.lang.String eventType,
IEvent event)
Post an event with the given type and represented by the given event to this EventContext. |
void |
reinitialize()
Reinitialize JMS resources using stored environment properties, and JMS topic name. |
boolean |
removeListener(java.lang.String eventTypeName,
EventListener listener)
Remove this listener from the list of listeners on events of type eventTypeName. |
protected void |
setContext(javax.naming.Context context)
Set the JNDI context to use. |
protected void |
setJMSQueue(javax.jms.Queue queue)
Deprecated. This method is no longer used due to internal refactoring. |
protected void |
setJMSTopic(javax.jms.Topic topic)
Deprecated. This method is no longer used due to internal refactoring. |
java.lang.String |
toString()
|
static void |
validateDurableClientID(java.lang.String strDurableClientID)
Convenience method for validating if the argument is a valid durable client ID for an EventContext. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int JMS_TOPIC
public static final int JMS_QUEUE
Constructor Detail |
protected EventContext()
public EventContext(java.lang.String sourceKey, java.lang.String sourceType, java.util.Hashtable jndiEnv, java.lang.String jmsDestName, int jmsDestType) throws javax.naming.NamingException, EventContextException
sourceKey
- - identifies the source of the events; cannot be nullsourceType
- - identifies the type of source; e.g. ApplicationView;
cannot be nulljndiEnv
- - contains properties needed to establish an initial JNDI
context to a J2EE application server.jmsDestName
- - the JNDI context for the JMS destination for eventsjmsDestType
- - destination type: JMS_TOPIC or JMS_QUEUEpublic EventContext(java.lang.String sourceKey, java.lang.String sourceType, javax.naming.Context context, java.lang.String jmsDestName, int jmsDestType) throws javax.naming.NamingException, EventContextException
sourceKey
- - identifies the source of the events; cannot be nullsourceType
- - identifies the type of source; e.g. ApplicationView;
cannot be nullcontext
- - a JNDI context to a J2EE application server.jmsDestName
- - the JNDI context for the JMS destination for eventsjmsDestType
- - destination type: JMS_TOPIC or JMS_QUEUEpublic EventContext(javax.security.auth.Subject authUser, java.lang.String sourceKey, java.lang.String sourceType, javax.naming.Context context, java.lang.String jmsDestName, int jmsDestType) throws javax.naming.NamingException, EventContextException
public EventContext(java.lang.String sourceKey, java.lang.String sourceType, javax.naming.Context context, java.lang.String jmsDestName, int jmsDestType, boolean bTransaction) throws javax.naming.NamingException, EventContextException
sourceKey
- - identifies the source of the events; cannot be nullsourceType
- - identifies the type of source; e.g. ApplicationView;
cannot be nullcontext
- - a JNDI context to a J2EE application server.jmsDestName
- - the JNDI context for the JMS destination for eventsjmsDestType
- - destination type: JMS_TOPIC or JMS_QUEUEbTransaction
- - not usedpublic EventContext(java.lang.String durableClientID, java.lang.String sourceKey, java.lang.String sourceType, java.util.Hashtable jndiEnv, java.lang.String jmsDestName) throws javax.naming.NamingException, EventContextException
durableClientID
- - an identifier of the client of this instance; this
ID is used to obtain durable subscriptions for this JMS topic. The ID must
be a valid Java identifier.sourceKey
- - identifies the source of the events; cannot be nullsourceType
- - identifies the type of source; e.g. ApplicationView;
cannot be nulljndiEnv
- - contains properties needed to establish an initial JNDI
context to a J2EE application server.jmsDestName
- - the JNDI context for the JMS topic for events
this parameter is currently not used by this implementation.public EventContext(java.lang.String durableClientID, java.lang.String sourceKey, java.lang.String sourceType, javax.naming.Context context, java.lang.String jmsDestName) throws javax.naming.NamingException, EventContextException
durableClientID
- - an identifier of the client of this instance; this
ID is used to obtain durable subscriptions for this JMS topic. The ID must
be a valid Java identifier.sourceKey
- - identifies the source of the events; cannot be nullsourceType
- - identifies the type of source; e.g. ApplicationView;
cannot be nulljndiEnv
- - contains properties needed to establish an initial JNDI
context to a J2EE application server.jmsDestName
- - the JNDI context for the JMS topic for events
this parameter is currently not used by this implementation.protected EventContext(java.lang.String durableClientID, java.lang.String sourceKey, java.lang.String sourceType, javax.naming.Context context, java.lang.String jmsDestName, int jmsDestType) throws javax.naming.NamingException, EventContextException
Method Detail |
public static final void validateDurableClientID(java.lang.String strDurableClientID) throws java.lang.IllegalArgumentException
protected void init(java.lang.String durableClientID, java.lang.String sourceKey, java.lang.String sourceType, javax.naming.Context context, java.lang.String jmsDestName, int jmsDestType) throws javax.naming.NamingException, EventContextException
public java.lang.String getSourceKey()
public java.lang.String getSourceType()
protected void initialize() throws javax.naming.NamingException, EventContextException
public void close()
protected void checkClosed() throws EventContextException
public void postEvent(java.lang.String eventType, IEvent event) throws DocumentException, EventContextException
public void addListener(java.lang.String eventTypeName, EventListener eventListener) throws EventContextException
public void addListener(java.lang.String eventTypeName, EventListener eventListener, java.lang.String subscriberName) throws EventContextException
eventTypeName
- eventListener
- subscriberName
- unique name for a durable subscriberpublic boolean containsListener(java.lang.String eventTypeName, EventListener listener)
public boolean removeListener(java.lang.String eventTypeName, EventListener listener)
protected void setJMSTopic(javax.jms.Topic topic)
protected void setJMSQueue(javax.jms.Queue queue)
protected void setContext(javax.naming.Context context)
public javax.naming.Context getContext()
public javax.jms.Topic getJMSTopic()
public javax.jms.Queue getJMSQueue()
public void reinitialize() throws javax.naming.NamingException, EventContextException
public java.lang.String toString()
public boolean equals(java.lang.Object obj)
protected final boolean compare(java.lang.Object obj1, java.lang.Object obj2)
|
WebLogic Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |