Interface AdapterManagerMBean

    • 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 an AdaptrisConnection 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 exception
        java.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 an AdaptrisConnection 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 the Channel 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 exception
        java.lang.IllegalStateException - if the state of the adapter is actually closed, in which case you should use addSharedConnection(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 exception
        java.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 a Service 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 exception
        java.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 an Service 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 the Channel 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 exception
        java.lang.IllegalStateException - if the state of the adapter is actually closed, in which case you should use addSharedConnection(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 exception
        java.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 both removeSharedService(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 exception
        java.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 a Channel to this adapter.
        Parameters:
        xmlString - the string representation of the channel.
        Returns:
        the ObjectName reference to the newly created ChannelManagerMBean.
        Throws:
        CoreException - wrapping any exception
        javax.management.MalformedObjectNameException - upon ObjectName errors.
      • removeChannel

        boolean removeChannel​(java.lang.String id)
                       throws CoreException,
                              javax.management.MalformedObjectNameException
        Remove a Channel from this adapter.

        This also removes the associated ChannelManager and calls BaseComponentMBean.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 exception
        javax.management.MalformedObjectNameException - upon ObjectName errors.
      • setMessageErrorHandler

        void setMessageErrorHandler​(java.lang.String xmlString)
                             throws CoreException
        Set the ProcessingExceptionHandler for this adapter.
        Parameters:
        xmlString - the string representation of the error handler.
        Throws:
        CoreException - wrapping any exception
        java.lang.IllegalStateException - if the state of the adapter is not "Closed"
      • setFailedMessageRetrier

        void setFailedMessageRetrier​(java.lang.String xmlString)
                              throws CoreException
        Set the FailedMessageRetrier for this adapter.
        Parameters:
        xmlString - the string representation of the error handler.
        Throws:
        CoreException - wrapping any exception
        java.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.
      • 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