java.lang.Object
org.apache.activemq.artemis.core.remoting.impl.AbstractAcceptor
org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptor
All Implemented Interfaces:
ActiveMQComponent, Acceptor

public class NettyAcceptor extends AbstractAcceptor
A Netty TCP Acceptor that is embedding Netty.
  • Field Details

  • Constructor Details

  • Method Details

    • getTcpReceiveBufferSize

      public int getTcpReceiveBufferSize()
    • start

      public void start() throws Exception
      Throws:
      Exception
    • getName

      public String getName()
      Description copied from interface: Acceptor
      The name of the acceptor used on the configuration. for logging and debug purposes.
    • getConnections

      public Map<Object,NettyServerConnection> getConnections()
    • getProtocolHandler

      public ProtocolHandler getProtocolHandler()
    • setKeyStoreParameters

      public void setKeyStoreParameters(String keyStorePath, String keyStoreAlias)
    • transfer

      public void transfer(io.netty.channel.Channel channel)
      Transfers the Netty channel that has been created outside of this NettyAcceptor to control it and configure it according to this NettyAcceptor setting.
      Parameters:
      channel - A Netty channel created outside this NettyAcceptor.
    • reload

      public void reload()
      Description copied from interface: Acceptor
      Re-create the acceptor with the existing configuration values. Useful, for example, for reloading key/trust stores on acceptors which support SSL.
    • getSslHandler

      public io.netty.handler.ssl.SslHandler getSslHandler(io.netty.buffer.ByteBufAllocator alloc, String peerHost, int peerPort) throws Exception
      Throws:
      Exception
    • getConfiguration

      public Map<String,Object> getConfiguration()
    • stop

      public void stop() throws Exception
      Throws:
      Exception
    • asyncStop

      public void asyncStop(Runnable callback)
    • notifyStop

      public void notifyStop()
    • isStarted

      public boolean isStarted()
    • pause

      public void pause()
      Description copied from interface: Acceptor
      Pause the acceptor and stop it from receiving client requests.
    • setNotificationService

      public void setNotificationService(NotificationService notificationService)
      Description copied from interface: Acceptor
      Set the notification service for this acceptor to use.
      Parameters:
      notificationService - the notification service
    • setDefaultActiveMQPrincipal

      public void setDefaultActiveMQPrincipal(ActiveMQPrincipal defaultActiveMQPrincipal)
      not allowed
    • isUnsecurable

      public boolean isUnsecurable()
      only InVM acceptors should allow this
    • getClusterConnection

      public ClusterConnection getClusterConnection()
      Returns:
      the cluster connection associated with this Acceptor
    • createConnectionCreator

      public ConnectionCreator createConnectionCreator()
    • getQuietPeriod

      public int getQuietPeriod()
    • setQuietPeriod

      public NettyAcceptor setQuietPeriod(int quietPeriod)
    • getShutdownTimeout

      public int getShutdownTimeout()
    • setShutdownTimeout

      public NettyAcceptor setShutdownTimeout(int shutdownTimeout)
    • isAutoStart

      public boolean isAutoStart()
    • getActualPort

      public int getActualPort()
      Description copied from interface: Acceptor
      This is a utility method for Socket-based acceptor implementations to get the actual port used. This is useful for configurations which specify a port number of 0 which allows the JVM to select an ephemeral port.
      Returns:
      the actual port used if using a Socket-based acceptor implementation; -1 otherwise