Interface RemotingService

All Known Implementing Classes:
RemotingServiceImpl

public interface RemotingService
  • Method Details

    • removeConnection

      RemotingConnection removeConnection(Object remotingConnectionID)
      Remove a connection from the connections held by the remoting service. This method must be used only from the management API. RemotingConnections are removed from the remoting service when their connectionTTL is hit.
      Parameters:
      remotingConnectionID - the ID of the RemotingConnection to removed
      Returns:
      the removed RemotingConnection
    • getConnection

      RemotingConnection getConnection(Object remotingConnectionID)
    • getConnections

      Set<RemotingConnection> getConnections()
    • getConnectionCount

      default int getConnectionCount()
      Returns the number of clients connected to this server.
      Returns:
      the number of clients connected to this server
    • getTotalConnectionCount

      long getTotalConnectionCount()
      Returns the number of clients which have connected to this server since it was started.
      Returns:
      the number of clients which have connected to this server since it was started
    • getConnectionCountLatch

      ReusableLatch getConnectionCountLatch()
    • addIncomingInterceptor

      void addIncomingInterceptor(BaseInterceptor interceptor)
    • getIncomingInterceptors

      List<BaseInterceptor> getIncomingInterceptors()
    • addOutgoingInterceptor

      void addOutgoingInterceptor(BaseInterceptor interceptor)
    • getOutgoinInterceptors

      List<BaseInterceptor> getOutgoinInterceptors()
    • removeIncomingInterceptor

      boolean removeIncomingInterceptor(BaseInterceptor interceptor)
    • removeOutgoingInterceptor

      boolean removeOutgoingInterceptor(BaseInterceptor interceptor)
    • notifyStop

      void notifyStop()
    • prepareStop

      void prepareStop(boolean criticalError, Set<RemotingConnection> ignoreConnections) throws Exception
      The Prepare stop will close all the connections however it will use the one used by storage manager
      Throws:
      Exception
    • stop

      void stop(boolean criticalError) throws Exception
      Throws:
      Exception
    • start

      void start() throws Exception
      Throws:
      Exception
    • startAcceptors

      void startAcceptors() throws Exception
      Throws:
      Exception
    • isStarted

      boolean isStarted()
    • getProtocolFactoryMap

      Map<String,ProtocolManagerFactory> getProtocolFactoryMap()
    • allowInvmSecurityOverride

      void allowInvmSecurityOverride(ActiveMQPrincipal principal)
      Allow acceptors to use this as their default security Principal if applicable.

      Used by AS7 integration code.

    • pauseAcceptors

      void pauseAcceptors()
      Pauses the acceptors so that no more connections can be made to the server
    • isPaused

      boolean isPaused()
      Pauses the acceptors so that no more connections can be made to the server
    • freeze

      void freeze(String scaleDownNodeID, CoreRemotingConnection remotingConnection)
      Freezes and then disconnects all connections except the given one and tells the client where else it might connect (only applicable if server is in a cluster and uses scaleDown-on-failover=true).
    • getAcceptor

      Acceptor getAcceptor(String name)
      Returns the acceptor identified by its name or null if it does not exists.
      Parameters:
      name - the name of the acceptor
      Returns:
      the acceptor identified by its name or null if it does not exists
    • getAcceptors

      Map<String,Acceptor> getAcceptors()
    • createAcceptor

      Acceptor createAcceptor(String name, String uri) throws Exception
      Throws:
      Exception
    • createAcceptor

      Acceptor createAcceptor(TransportConfiguration transportConfiguration)
    • destroyAcceptor

      void destroyAcceptor(String name) throws Exception
      Throws:
      Exception
    • loadProtocolServices

      void loadProtocolServices(List<ActiveMQComponent> protocolServices)
    • updateProtocolServices

      void updateProtocolServices(List<ActiveMQComponent> protocolServices) throws Exception
      Provides an entry point for protocol services offered by this service instance to react to configuration updates. If the service implementation does not have any managed services or its services do not respond to updates it can ignore this call. services added should be added to the provided protocolServices list, and any removed should be found and removed from the list.
      Parameters:
      protocolServices - The list of protocol services known to the broker.
      Throws:
      Exception - if an error is thrown during the services updates.
    • addConnectionEntry

      void addConnectionEntry(Connection connection, ConnectionEntry entry)