public abstract class WmConnectedListener extends WmNotificationListener implements WmRequiresConnection
WmManagedConnection
_lastError, _listenerNodeName, _retryCount, _statistics
Constructor and Description |
---|
WmConnectedListener() |
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
adapterCheckValue(java.lang.String serviceName,
java.lang.String resourceDomainName,
java.lang.String[][] values,
java.lang.String testValue)
Checks a resourceDomain value.
|
ResourceDomainValues[] |
adapterResourceDomainLookup(java.lang.String serviceName,
java.lang.String resourceDomainName,
java.lang.String[][] values)
Looks up values for a resourceDomain.
|
protected void |
beginTransaction()
Sets up a transaction.
|
protected void |
checkTransaction()
Called to ensure no transaction is currently associated with this Thread.
|
protected void |
cleanup()
Extends this same method in WmNotificationListener to close the
connection and disassociate it from this listener.
|
protected void |
commit()
Commits the current transaction.
|
void |
discoverParameters(AdapterParameters ap)
Does a double-dispatch to the AdapterParameters object.
|
java.lang.String |
getConnDataNodeName()
This may be called to get the fully qualified name of the
Integration Server namespace node for the connection being
used by the listener.
|
void |
handleRecoverableException(java.lang.Throwable t)
Extends this same method in WmNotificationListener to do a pool refresh
of the connection.
|
void |
initialize()
extends base class implementation to configure the connection node.
|
void |
notifyEvent(int eventType)
Called to propogate the listener lifecycle events of startup,
copy, update, delete.
|
protected NotificationResults |
processNotification(WmListenerNotification notif,
java.lang.Object data)
This method is called to execute a single listener notification.
|
void |
registerResourceDomain(WmAdapterAccess access)
Sets a reference to the
WmAdapterAccess object. |
WmManagedConnection |
retrieveConnection()
Called from a listener to retrieve a connection.
|
protected void |
rollback()
Rolls back the current transaction.
|
void |
setConnDataNodeName(java.lang.String val) |
void |
setup()
extends base class implementation to initialize the runtime connection.
|
void |
shutdownCallBack(WmManagedConnection wmc)
This method is called before an adapter listener shuts down.
|
void |
useConnection(WmManagedConnection connection)
Methods for WmRequiresConnection interface.
|
createNotificationEvent, doShutdown, execute, fillWmDescriptor, fillWmUIDescriptor, getLastError, getLastErrorMessage, getListenerNode, getLoggableName, getRegisteredNotifications, getStatistics, handleFatalException, initListenerNodeProperties, listenerShutdown, listenerStartup, logCallback, logDebugPlus, logDebugPlusNamed, logDebugPlusNamed, makeDetailedException, makeDetailedException, makeDetailedException, makeDetailedException, processNotificationResults, registerNotification, resetRetryCount, resourceDomainLookup, restrictNotificationTypes, run, runListener, runNotifications, setRegisteredNotifications, unregisterNotification, waitForData
public java.lang.Boolean adapterCheckValue(java.lang.String serviceName, java.lang.String resourceDomainName, java.lang.String[][] values, java.lang.String testValue) throws AdapterException
Boolean.TRUE
if
testValue is valid in this context, Boolean.FALSE
if it is
not valid, or null
if the value can't be confirmed by the
adapter.
Implement this method if your adapter supports resourceDomains. Return
null
if you are not able to confirm the value. Otherwise,
return Boolean.TRUE
if the value is valid, or
Boolean.FALSE
if the value is not valid.
When a user types a value into the operation editor that is displaying
an incomplete resourceDomain (ResourceDomainValues
.complete
is false)
and the ResourceDomainValues
.canValidate
flag is true.
adapterCheckValue
in interface ResourceDomainDataProvider
adapterCheckValue
in class WmNotificationListener
serviceName
- the name of the service templateresourceDomainName
- the name of the resourceDomainvalues
- the values for the resourceDomain parameterstestValue
- the value to testBoolean.TRUE
if testValue
is valid
in this context, Boolean.FALSE
if it is not
valid, or null
if the value can't be confirmed
by the adapter.AdapterException
- if something went wrongpublic ResourceDomainValues[] adapterResourceDomainLookup(java.lang.String serviceName, java.lang.String resourceDomainName, java.lang.String[][] values) throws AdapterException
ResourceDomainValues
class with the proper data. Return multiple classes
if you are using tuples.adapterResourceDomainLookup
in interface ResourceDomainDataProvider
adapterResourceDomainLookup
in class WmNotificationListener
serviceName
- the name of the service/notification templateresourceDomainName
- the name of the resourceDomainvalues
- the values for the resourceDomain parametersAdapterException
- if something went wrongprotected void beginTransaction() throws javax.resource.ResourceException
beginTransaction
in class WmNotificationListener
javax.resource.ResourceException
protected void checkTransaction() throws javax.resource.ResourceException
checkTransaction
in class WmNotificationListener
javax.resource.ResourceException
protected void cleanup()
cleanup
in class WmNotificationListener
WmNotificationListener.cleanup()
protected void commit() throws javax.resource.ResourceException
commit
in class WmNotificationListener
javax.resource.ResourceException
public void discoverParameters(AdapterParameters ap) throws AdapterException
discoverParameters
in class WmNotificationListener
AdapterException
public java.lang.String getConnDataNodeName()
public void handleRecoverableException(java.lang.Throwable t) throws com.wm.pkg.art.error.DetailedException
handleRecoverableException
in class WmNotificationListener
com.wm.pkg.art.error.DetailedException
WmNotificationListener.handleRecoverableException(Throwable t)
public void initialize()
initialize
in class WmNotificationListener
public final void notifyEvent(int eventType) throws com.wm.pkg.art.error.DetailedException
notifyEvent
in class WmNotificationListener
et
- The type of event that just occured. It must match one of the
constants NOTIFY_UPDATE, NOTIFY_DELETE, NOTIFY_INIT, NOTIFY_STARTUP,
NOTIFY_SHUTDOWN, NOTIFY_ENABLE, NOTIFY_DISABLEcom.wm.pkg.art.error.DetailedException
protected NotificationResults processNotification(WmListenerNotification notif, java.lang.Object data) throws javax.resource.ResourceException
processNotification
in class WmNotificationListener
javax.resource.ResourceException
public void registerResourceDomain(WmAdapterAccess access) throws AdapterException
WmAdapterAccess
object. Will be called
after the constructor has been called, but before any
properties are set. The reference to WmAdapterAccess should be
stored for later use, if needed.
Register resourceDomain, using
addResourceDomainLookup
,
addResourceDomain
, etc.) in this method.
registerResourceDomain
in interface ResourceDomainDataProvider
registerResourceDomain
in class WmNotificationListener
access
- reference to WmAdapterAccess objectAdapterException
- something went wrongpublic WmManagedConnection retrieveConnection()
retrieveConnection
in interface WmRequiresConnection
WmNotification
protected void rollback() throws javax.resource.ResourceException
rollback
in class WmNotificationListener
javax.resource.ResourceException
public void setConnDataNodeName(java.lang.String val)
public void setup() throws javax.resource.ResourceException
setup
in class WmNotificationListener
javax.resource.ResourceException
public void shutdownCallBack(WmManagedConnection wmc) throws javax.resource.ResourceException
javax.resource.ResourceException
- if a processing error has occuredpublic final void useConnection(WmManagedConnection connection)
useConnection
in interface WmRequiresConnection
Copyright © 2003 - 2021 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.