com.ibm.commerce.marketingcenter.externalevent
Interface WCSExternalEventListener
- All Superinterfaces:
- java.util.EventListener
- public interface WCSExternalEventListener
- extends java.util.EventListener
All WebSphere Commerce Suite external listeners must implement this interface in order to receive events from WebSphere Commerce Suite.
Field Summary |
static java.lang.String |
COPYRIGHT
|
Method Summary |
void |
destroy()
This method will be invoked by the WebSphere Commerce Suite framework when the WebSphere Commerce Suite environment shuts down. |
void |
eventOccurred(WCSExternalEventObject evt)
When WebSphere Commerce Suite external events occur, this method will be called to notify all of the registered listeners. |
void |
init(WCSExternalEventSource source)
This method is invoked by the WebSphere Commerce Suite framework. |
void |
reinit()
This method is invoked by the WebSphere Commerce Suite framework to notify each registered listener to re-initialize. |
COPYRIGHT
public static final java.lang.String COPYRIGHT
destroy
public void destroy()
- This method will be invoked by the WebSphere Commerce Suite framework when the WebSphere Commerce Suite environment shuts down.
Each listener should perform its own cleanup. This method undoes what is done
by the
init()
method. It should also unregister from the WCSExternalEventSource.
eventOccurred
public void eventOccurred(WCSExternalEventObject evt)
throws WCSException
- When WebSphere Commerce Suite external events occur, this method will be called to notify all of the registered listeners.
If an error occurs internally, it should throw a WCSException and the error will be logged into the
WebSphere Commerce Suite Log. Depending on the nature of the error, the listener may want to unregister itself
before raising the exception. Note that as part of the event handling, WCSExternalEventSource will
first make a local copy of all of the registered listeners before calling the
eventOccurred()
method
of each listener. That means any "unregister" call during this phase will NOT take effect until the current
event handling is complete.
- Parameters:
evt
- WebSphere Commerce Suite external event- Throws:
WCSException
-
init
public void init(WCSExternalEventSource source)
throws WCSException
- This method is invoked by the WebSphere Commerce Suite framework. Each listener performs its own initialization
here and registers with the WCSExternalEventSource using the
addWCSExternalEventListener()
method.
If errors occur during the listener's initialization, it should not register with the
WCSExternalEventSource but instead throw a WCSException which will be logged into the instance log.
- Parameters:
source
- WCSExternalEventSource instance- Throws:
WCSException
-
reinit
public void reinit()
throws WCSException
- This method is invoked by the WebSphere Commerce Suite framework to notify each registered listener to re-initialize.
There is no need to register with the WCSExternalEventSource again. If errors occur during its own
initialization, it should unregister itself from the WCSExternalEventSource and throw a
WCSException which will be logged into the instance log.
- Throws:
WCSException
-