Interface Acceptor
-
- All Superinterfaces:
ActiveMQComponent
- All Known Implementing Classes:
AbstractAcceptor,InVMAcceptor,NettyAcceptor
public interface Acceptor extends ActiveMQComponent
An Acceptor is used by the RemotingService to allow clients to connect. It should take care of dispatching client requests to the RemotingService's Dispatcher.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intgetActualPort()This is a utility method for Socket-based acceptor implementations to get the actual port used.ClusterConnectiongetClusterConnection()Map<String,Object>getConfiguration()StringgetName()The name of the acceptor used on the configuration.default ProtocolHandlergetProtocolHandler()booleanisUnsecurable()Whether this acceptor allows insecure connections.voidpause()Pause the acceptor and stop it from receiving client requests.voidreload()Re-create the acceptor with the existing configuration values.voidsetDefaultActiveMQPrincipal(ActiveMQPrincipal defaultActiveMQPrincipal)Set the default security Principal to be used when no user/pass are defined, only for InVMvoidsetNotificationService(NotificationService notificationService)Set the notification service for this acceptor to use.voidupdateInterceptors(List<BaseInterceptor> incomingInterceptors, List<BaseInterceptor> outgoingInterceptors)This will update the list of interceptors for each ProtocolManager inside the acceptor.-
Methods inherited from interface org.apache.activemq.artemis.core.server.ActiveMQComponent
asyncStop, isStarted, start, stop
-
-
-
-
Method Detail
-
getName
String getName()
The name of the acceptor used on the configuration. for logging and debug purposes.
-
pause
void pause()
Pause the acceptor and stop it from receiving client requests.
-
updateInterceptors
void updateInterceptors(List<BaseInterceptor> incomingInterceptors, List<BaseInterceptor> outgoingInterceptors)
This will update the list of interceptors for each ProtocolManager inside the acceptor.
-
getClusterConnection
ClusterConnection getClusterConnection()
- Returns:
- the cluster connection associated with this Acceptor
-
setNotificationService
void setNotificationService(NotificationService notificationService)
Set the notification service for this acceptor to use.- Parameters:
notificationService- the notification service
-
setDefaultActiveMQPrincipal
void setDefaultActiveMQPrincipal(ActiveMQPrincipal defaultActiveMQPrincipal)
Set the default security Principal to be used when no user/pass are defined, only for InVM
-
isUnsecurable
boolean isUnsecurable()
Whether this acceptor allows insecure connections.- Throws:
IllegalStateException- if false @setDefaultActiveMQPrincipal
-
reload
void reload()
Re-create the acceptor with the existing configuration values. Useful, for example, for reloading key/trust stores on acceptors which support SSL.
-
getProtocolHandler
default ProtocolHandler getProtocolHandler()
-
getActualPort
default int getActualPort()
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
-
-