Interface AdapterManagerMBean
-
- All Superinterfaces:
AdapterComponentMBean
,BaseComponentMBean
,HierarchicalMBean
,ParentComponentMBean
,ParentRuntimeInfoComponentMBean
,RuntimeInfoComponent
- All Known Implementing Classes:
AdapterManager
public interface AdapterManagerMBean extends AdapterComponentMBean, ParentRuntimeInfoComponentMBean, HierarchicalMBean, ParentComponentMBean
MBean specification that allows control of a single adapter.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NOTIF_MSG_FORCE_CLOSE
Standard Message for a force close notification '"Adapter Force Close" '-
Fields inherited from interface com.adaptris.core.runtime.AdapterComponentMBean
ADAPTER_PREFIX, CHANNEL_PREFIX, EQUALS, ID_PREFIX, JMX_ADAPTER_TYPE, JMX_CHANNEL_TYPE, JMX_CONSUMER_MONITOR_TYPE, JMX_DOMAIN_NAME, JMX_FAILED_MESSAGE_RETRIER_TYPE, JMX_FS_MONITOR_TYPE, JMX_INFLIGHT_TYPE, JMX_LOG_HANDLER_TYPE, JMX_METRICS_TYPE, JMX_MSG_ERR_DIGESTER_TYPE, JMX_NOTIFIER_TYPE, JMX_RETRY_MONITOR_TYPE, JMX_WORKFLOW_TYPE, KEY_ADAPTER, KEY_CHANNEL, KEY_ID, KEY_WORKFLOW, NOTIF_MSG_CLOSED, NOTIF_MSG_CONFIG_UPDATED, NOTIF_MSG_INITIALISED, NOTIF_MSG_RESTARTED, NOTIF_MSG_STARTED, NOTIF_MSG_STOPPED, NOTIF_TYPE_ADAPTER_CONFIG, NOTIF_TYPE_ADAPTER_LIFECYCLE, NOTIF_TYPE_CHANNEL_CONFIG, NOTIF_TYPE_CHANNEL_LIFECYCLE, NOTIF_TYPE_WORKFLOW_CONFIG, NOTIF_TYPE_WORKFLOW_LIFECYCLE, PROPERTY_SEPARATOR, WORKFLOW_PREFIX
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addAndBindSharedConnection(java.lang.String xmlString)
Add anAdaptrisConnection
to the adapter's shared components.boolean
addAndBindSharedService(java.lang.String xmlString)
Add anService
to the adapter's shared components.javax.management.ObjectName
addChannel(java.lang.String xmlString)
Add aChannel
to this adapter.boolean
addSharedConnection(java.lang.String xmlString)
Add anAdaptrisConnection
to the adapter's shared components..boolean
addSharedService(java.lang.String xmlString)
Add aService
to the adapter's shared components.boolean
containsSharedConnection(java.lang.String connectionId)
Check if the associated connectionId is already present in the shared connections.boolean
containsSharedService(java.lang.String serviceId)
Check if the associated serviceId is already present in the shared services.void
forceClose()
Forcibly close the associated adapter.java.lang.String
getAdapterBuildVersion()
Get the adapter build version.java.util.List<java.lang.String>
getArtifactIdentifiers()
Get a list of all the modules currently installed for this adapter.java.util.List<java.lang.String>
getModuleVersions()
Get a list of all the modules currently installed for this adapter.java.util.Collection<java.lang.String>
getSharedConnectionIds()
Get all the connection unique-ids that are currently registered as a shared connection.java.util.Collection<java.lang.String>
getSharedServiceIds()
Get all the service unique-ids that are currently registered as a shared service.boolean
removeChannel(java.lang.String id)
Remove aChannel
from this adapter.boolean
removeSharedComponent(java.lang.String id)
Convenience method to do bothremoveSharedService(String)
and#removeSharedConnection(String)
at once.boolean
removeSharedConnection(java.lang.String connectionId)
Remove a connection from the adapter's shared connections.boolean
removeSharedService(java.lang.String serviceId)
Remove a service from the adapter's shared components.void
sendLifecycleEvent(AdapterLifecycleEvent event)
Send anAdapterLifecycleEvent
to any configured event handlers.void
setFailedMessageRetrier(java.lang.String xmlString)
Set theFailedMessageRetrier
for this adapter.void
setMessageErrorHandler(java.lang.String xmlString)
Set theProcessingExceptionHandler
for this adapter.-
Methods inherited from interface com.adaptris.core.runtime.AdapterComponentMBean
getComponentState, getConfiguration, getUniqueId, getWrappedComponentClassname, requestClose, requestClose, requestInit, requestInit, requestRestart, requestRestart, requestStart, requestStart, requestStartTime, requestStop, requestStop, requestStopTime
-
Methods inherited from interface com.adaptris.core.runtime.BaseComponentMBean
createObjectName, registerMBean, unregisterMBean
-
Methods inherited from interface com.adaptris.core.runtime.HierarchicalMBean
createObjectHierarchyString
-
Methods inherited from interface com.adaptris.core.runtime.ParentComponentMBean
getChildren
-
Methods inherited from interface com.adaptris.core.runtime.ParentRuntimeInfoComponentMBean
getChildRuntimeInfoComponents
-
-
-
-
Field Detail
-
NOTIF_MSG_FORCE_CLOSE
static final java.lang.String NOTIF_MSG_FORCE_CLOSE
Standard Message for a force close notification '"Adapter Force Close" '- See Also:
- Constant Field Values
-
-
Method Detail
-
addSharedConnection
boolean addSharedConnection(java.lang.String xmlString) throws CoreException, java.lang.IllegalStateException, java.lang.IllegalArgumentException
Add anAdaptrisConnection
to the adapter's shared components..- Parameters:
xmlString
- the string representation of the connection.- Returns:
- true if the connection was added, false if the connection's unique-id already exists in the list.
- Throws:
CoreException
- wrapping any other exceptionjava.lang.IllegalStateException
- if the state of the adapter is not closed.java.lang.IllegalArgumentException
- if the connection does not have an unique-id
-
addAndBindSharedConnection
boolean addAndBindSharedConnection(java.lang.String xmlString) throws CoreException, java.lang.IllegalStateException, java.lang.IllegalArgumentException
Add anAdaptrisConnection
to the adapter's shared components. and bind it to JNDI.This is primarily for adding shared connections when the Adapter is currently started. Runtime manipulation of the adapter allows you to invoke
addChannel(String)
while the adapter is running. If theChannel
object contains a reference to a shared connection, then you should use this method to add the and bind the shared connection to JNDI ready for use.- Parameters:
xmlString
- the string representation of the connection.- Returns:
- true if the connection was added, false if the connection's unique-id already exists in the list.
- Throws:
CoreException
- wrapping any other exceptionjava.lang.IllegalStateException
- if the state of the adapter is actually closed, in which case you should useaddSharedConnection(String)
instead..java.lang.IllegalArgumentException
- if the connection does not have an unique-id
-
removeSharedConnection
boolean removeSharedConnection(java.lang.String connectionId) throws CoreException, java.lang.IllegalStateException
Remove a connection from the adapter's shared connections.- Parameters:
connectionId
- the connection unique-id to remove.- Returns:
- true if the connection was removed, false otherwise.
- Throws:
CoreException
- wrapping any other exceptionjava.lang.IllegalStateException
- if the state of the adapter is not closed.
-
containsSharedConnection
boolean containsSharedConnection(java.lang.String connectionId) throws CoreException
Check if the associated connectionId is already present in the shared connections.- Parameters:
connectionId
- the connection unique-id to check for- Returns:
- true if the connection unique-id exists
- Throws:
CoreException
- wrapping any other exception
-
getSharedConnectionIds
java.util.Collection<java.lang.String> getSharedConnectionIds() throws CoreException
Get all the connection unique-ids that are currently registered as a shared connection.- Returns:
- collection of connectionIds
- Throws:
CoreException
- wrapping any other exception
-
addSharedService
boolean addSharedService(java.lang.String xmlString) throws CoreException, java.lang.IllegalStateException, java.lang.IllegalArgumentException
Add aService
to the adapter's shared components.- Parameters:
xmlString
- the string representation of the service.- Returns:
- true if the service was added, false if the service unique-id already exists in the list.
- Throws:
CoreException
- wrapping any other exceptionjava.lang.IllegalStateException
- if the state of the adapter is not closed.java.lang.IllegalArgumentException
- if the connection does not have an unique-id
-
addAndBindSharedService
boolean addAndBindSharedService(java.lang.String xmlString) throws CoreException, java.lang.IllegalStateException, java.lang.IllegalArgumentException
Add anService
to the adapter's shared components. and bind it to JNDI.This is primarily for adding shared services when the Adapter is currently started. Runtime manipulation of the adapter allows you to invoke
addChannel(String)
while the adapter is running. If theChannel
object contains a reference to a shared service, then you should use this method to add the and bind the shared connection to JNDI ready for use.- Parameters:
xmlString
- the string representation of the service.- Returns:
- true if the service was added, false if the service unique-id already exists in the list.
- Throws:
CoreException
- wrapping any other exceptionjava.lang.IllegalStateException
- if the state of the adapter is actually closed, in which case you should useaddSharedConnection(String)
instead..java.lang.IllegalArgumentException
- if the connection does not have an unique-id
-
removeSharedService
boolean removeSharedService(java.lang.String serviceId) throws CoreException, java.lang.IllegalStateException
Remove a service from the adapter's shared components.- Parameters:
serviceId
- the shared service unique-id to remove.- Returns:
- true if the service was removed, false otherwise.
- Throws:
CoreException
- wrapping any other exceptionjava.lang.IllegalStateException
- if the state of the adapter is not closed.
-
containsSharedService
boolean containsSharedService(java.lang.String serviceId) throws CoreException
Check if the associated serviceId is already present in the shared services.- Parameters:
serviceId
- the shared service unique-id to remove.- Returns:
- true if the connection unique-id exists
- Throws:
CoreException
- wrapping any other exception
-
getSharedServiceIds
java.util.Collection<java.lang.String> getSharedServiceIds() throws CoreException
Get all the service unique-ids that are currently registered as a shared service.- Returns:
- collection of service-ids
- Throws:
CoreException
- wrapping any other exception
-
removeSharedComponent
boolean removeSharedComponent(java.lang.String id) throws CoreException, java.lang.IllegalStateException
Convenience method to do bothremoveSharedService(String)
and#removeSharedConnection(String)
at once.- Parameters:
id
- the shared id to remove.- Returns:
- true if something was removed; false otherwise.
- Throws:
CoreException
- wrapping any other exceptionjava.lang.IllegalStateException
- if the state of the adapter is not closed.
-
addChannel
javax.management.ObjectName addChannel(java.lang.String xmlString) throws CoreException, javax.management.MalformedObjectNameException
Add aChannel
to this adapter.- Parameters:
xmlString
- the string representation of the channel.- Returns:
- the ObjectName reference to the newly created ChannelManagerMBean.
- Throws:
CoreException
- wrapping any exceptionjavax.management.MalformedObjectNameException
- upon ObjectName errors.
-
removeChannel
boolean removeChannel(java.lang.String id) throws CoreException, javax.management.MalformedObjectNameException
Remove aChannel
from this adapter.This also removes the associated
ChannelManager
and callsBaseComponentMBean.unregisterMBean()
.- Parameters:
id
- the id of the channel to remove.- Returns:
- true if the channel existed and was removed, false otherwise.
- Throws:
CoreException
- wrapping any exceptionjavax.management.MalformedObjectNameException
- upon ObjectName errors.
-
setMessageErrorHandler
void setMessageErrorHandler(java.lang.String xmlString) throws CoreException
Set theProcessingExceptionHandler
for this adapter.- Parameters:
xmlString
- the string representation of the error handler.- Throws:
CoreException
- wrapping any exceptionjava.lang.IllegalStateException
- if the state of the adapter is not "Closed"
-
setFailedMessageRetrier
void setFailedMessageRetrier(java.lang.String xmlString) throws CoreException
Set theFailedMessageRetrier
for this adapter.- Parameters:
xmlString
- the string representation of the error handler.- Throws:
CoreException
- wrapping any exceptionjava.lang.IllegalStateException
- if the state of the adapter is not "Closed"
-
getAdapterBuildVersion
java.lang.String getAdapterBuildVersion()
Get the adapter build version.- Returns:
- the adapter build version.
-
getModuleVersions
java.util.List<java.lang.String> getModuleVersions()
Get a list of all the modules currently installed for this adapter.- Returns:
- list of modules + version numbers.
-
getArtifactIdentifiers
java.util.List<java.lang.String> getArtifactIdentifiers()
Get a list of all the modules currently installed for this adapter.- Returns:
- list of
groupId:artifactId:version
.
-
sendLifecycleEvent
void sendLifecycleEvent(AdapterLifecycleEvent event) throws CoreException
Send anAdapterLifecycleEvent
to any configured event handlers.- Parameters:
event
- theAdapterLifecycleEvent
to send.- Throws:
CoreException
- wrapping any exception
-
forceClose
void forceClose() throws CoreException
Forcibly close the associated adapter.In the event that there is a concrete
AllowsRetriesConnection
that is configured incorrectly, and set with infinite retries; then the adapter will appear to be stuck waiting in the incorrect state (generally, attempting to initialise) when asked nicely to stop. Use this method to forcibly terminate whatever operations are being attempted and to shutdown the adapter.- Throws:
CoreException
-
-