public final class SNMPConnectionHandler extends ConnectionHandler<SnmpConnectionHandlerCfg> implements ConfigurationChangeListener<SnmpConnectionHandlerCfg>, AlertGenerator
Constructor and Description |
---|
SNMPConnectionHandler()
Creates a new instance of this connection handler.
|
Modifier and Type | Method and Description |
---|---|
ConfigChangeResult |
applyConfigurationChange(SnmpConnectionHandlerCfg configuration)
Applies the configuration changes to this change listener.
|
void |
bind()
Operates in a loop, accepting new connections and ensuring that requests on those connections are handled
properly.
|
void |
doClose()
Closes this connection handler so that it will no longer accept new client connections.
|
void |
doInitializeConnectionHandler(ServerContext serverContext,
SnmpConnectionHandlerCfg configuration)
Initializes this connection handler provider based on the information in the provided connection handler
configuration.
|
Map<String,String> |
getAlerts()
Retrieves information about the set of alerts that this generator may produce.
|
String |
getClassName()
Retrieves the fully-qualified name of the Java class for this alert generator implementation.
|
Collection<ClientConnection> |
getClientConnections()
Retrieves the set of active client connections that have been established through this connection handler.
|
Dn |
getComponentEntryDN()
Retrieves the DN of the configuration entry with which this alert generator is associated.
|
String |
getConnectionHandlerName()
Retrieves a name that may be used to refer to this connection handler.
|
Collection<HostPort> |
getListeners()
Retrieves information about the listener(s) that will be used to accept client connections.
|
String |
getProtocol()
Retrieves the name of the protocol used to communicate with clients.
|
boolean |
isConfigurationChangeAcceptable(SnmpConnectionHandlerCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable
to this change listener.
|
void |
toString(StringBuilder buffer)
Appends a string representation of this connection handler to the provided buffer.
|
close, getEnabledSSLCipherSuites, getEnabledSSLProtocols, getNumRequestHandlers, initializeConnectionHandler, isConfigurationAcceptable, setAdminConnectionHandler, toString
public SNMPConnectionHandler()
initializeConnectionHandler
method.public void doInitializeConnectionHandler(ServerContext serverContext, SnmpConnectionHandlerCfg configuration) throws ConfigException, InitializationException
ConnectionHandler
doInitializeConnectionHandler
in class ConnectionHandler<SnmpConnectionHandlerCfg>
serverContext
- The server context.configuration
- The connection handler configuration that contains the information to use to initialize this
connection handler.ConfigException
- If an unrecoverable problem arises in the process of performing the initialization as a result of the
server configuration.InitializationException
- If a problem occurs during initialization that is not related to the server configuration.public String getConnectionHandlerName()
ConnectionHandler
getConnectionHandlerName
in class ConnectionHandler<SnmpConnectionHandlerCfg>
public String getProtocol()
ConnectionHandler
getProtocol
in class ConnectionHandler<SnmpConnectionHandlerCfg>
public Collection<HostPort> getListeners()
ConnectionHandler
getListeners
in class ConnectionHandler<SnmpConnectionHandlerCfg>
public Collection<ClientConnection> getClientConnections()
ConnectionHandler
getClientConnections
in class ConnectionHandler<SnmpConnectionHandlerCfg>
public void bind()
ConnectionHandler
bind
in class ConnectionHandler<SnmpConnectionHandlerCfg>
public void toString(StringBuilder buffer)
ConnectionHandler
toString
in class ConnectionHandler<SnmpConnectionHandlerCfg>
buffer
- The buffer to which the information should be appended.public boolean isConfigurationChangeAcceptable(SnmpConnectionHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons)
ConfigurationChangeListener
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<SnmpConnectionHandlerCfg>
configuration
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.true
if the proposed change is acceptable,
or false
if it is not.public ConfigChangeResult applyConfigurationChange(SnmpConnectionHandlerCfg configuration)
ConfigurationChangeListener
applyConfigurationChange
in interface ConfigurationChangeListener<SnmpConnectionHandlerCfg>
configuration
- The new configuration containing the changes.public Dn getComponentEntryDN()
ConnectionHandler
getComponentEntryDN
in interface AlertGenerator
getComponentEntryDN
in class ConnectionHandler<SnmpConnectionHandlerCfg>
public String getClassName()
AlertGenerator
getClassName
in interface AlertGenerator
public Map<String,String> getAlerts()
AlertGenerator
getAlerts
in interface AlertGenerator
public void doClose()
ConnectionHandler
doClose
in class ConnectionHandler<SnmpConnectionHandlerCfg>
Copyright 2010-2020 ForgeRock AS.