public final class SNMPConnectionHandler extends ConnectionHandler<SnmpConnectionHandlerCfg> implements ConfigurationChangeListener<SnmpConnectionHandlerCfg>, AlertGenerator
Modifier and Type | Field and Description |
---|---|
static Path |
JDMKT_JAR_PATH
The relative path of the jdmkt jar from the server root.
|
Constructor and Description |
---|
SNMPConnectionHandler() |
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.
|
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.
|
String |
getConnectionHandlerType()
Returns the type of 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.
|
addAdditionalMeters, addAdditionalMonitorObjectClassNames, close, getEnabledSSLCipherSuites, getEnabledSSLProtocols, getHealthStatus, getNumRequestHandlers, initializeConnectionHandler, isConfigurationAcceptable, setAdminConnectionHandler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getClassName
public static final Path JDMKT_JAR_PATH
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 Dn getComponentEntryDN()
ConnectionHandler
getComponentEntryDN
in interface AlertGenerator
getComponentEntryDN
in class ConnectionHandler<SnmpConnectionHandlerCfg>
public String getConnectionHandlerName()
ConnectionHandler
getConnectionHandlerName
in class ConnectionHandler<SnmpConnectionHandlerCfg>
public String getConnectionHandlerType()
ConnectionHandler
ConnectionHandler.getProtocol()
.
It should be returning the insecure protocol version.getConnectionHandlerType
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 Map<String,String> getAlerts()
AlertGenerator
getAlerts
in interface AlertGenerator
public void doClose()
ConnectionHandler
doClose
in class ConnectionHandler<SnmpConnectionHandlerCfg>
Copyright 2010-2022 ForgeRock AS.