|
OpenNMS API 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.capsd.AbstractPlugin
org.opennms.netmgt.capsd.AbstractTcpPlugin
Implements the basic functionality of a Tcp based servicethat can be discovered by OpenNMS. It extends the AbstractPlugin class and provides methods for creating the sockets and dealing with timeouts and reteries.
Field Summary | |
(package private) int |
m_defaultPort
|
(package private) int |
m_defaultRetry
|
(package private) int |
m_defaultTimeout
|
(package private) java.lang.String |
m_pluginName
|
(package private) java.lang.String |
m_protocolName
|
Constructor Summary | |
protected |
AbstractTcpPlugin(java.lang.String protocol,
int defaultTimeout,
int defaultRetry)
|
protected |
AbstractTcpPlugin(java.lang.String protocol,
int defaultPort,
int defaultTimeout,
int defaultRetry)
|
Method Summary | |
protected boolean |
checkConnection(ConnectionConfig config)
Test to see if the passed host-port pair is the endpoint for an Citrix server. |
protected abstract boolean |
checkProtocol(java.net.Socket socket,
ConnectionConfig config)
|
protected void |
closeSocket(java.net.Socket socket,
ConnectionConfig config)
|
protected ConnectionConfig |
createConnectionConfig(java.net.InetAddress address,
int port)
|
protected java.util.List |
getConnectionConfigList(java.util.Map qualifiers,
java.net.InetAddress address)
|
protected int |
getKeyedInteger(java.util.Map qualifiers,
java.lang.String key,
int defaultVal)
|
protected int[] |
getKeyedIntegerArray(java.util.Map qualifiers,
java.lang.String key,
int[] defaultVal)
|
java.lang.String |
getPluginName()
|
java.lang.String |
getProtocolName()
Returns the name of the protocol that this plugin checks on the target system for support. |
boolean |
isProtocolSupported(java.net.InetAddress address)
Returns true if the protocol defined by this plugin is supported. |
boolean |
isProtocolSupported(java.net.InetAddress address,
java.util.Map qualifiers)
Returns true if the protocol defined by this plugin is supported. |
protected void |
populateConnectionConfig(ConnectionConfig config,
java.util.Map qualifiers)
|
protected boolean |
preconnectCheck(ConnectionConfig config)
|
protected void |
saveConfig(java.util.Map qualifiers,
ConnectionConfig config)
|
protected void |
saveKeyedInteger(java.util.Map qualifiers,
java.lang.String key,
int value)
|
void |
setPluginName(java.lang.String pluginName)
|
protected java.net.Socket |
wrapSocket(java.net.Socket socket,
ConnectionConfig config)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
int m_defaultPort
int m_defaultRetry
int m_defaultTimeout
java.lang.String m_pluginName
java.lang.String m_protocolName
Constructor Detail |
protected AbstractTcpPlugin(java.lang.String protocol, int defaultTimeout, int defaultRetry)
protected AbstractTcpPlugin(java.lang.String protocol, int defaultPort, int defaultTimeout, int defaultRetry)
Method Detail |
protected final boolean checkConnection(ConnectionConfig config)
Test to see if the passed host-port pair is the endpoint for an Citrix server. If there is an Citrix server at that destination then a value of true is returned from the method. Otherwise a false value is returned to the caller.
config
-
protected void closeSocket(java.net.Socket socket, ConnectionConfig config)
socket
- protected abstract boolean checkProtocol(java.net.Socket socket, ConnectionConfig config) throws java.lang.Exception
socket
-
java.lang.Exception
protected ConnectionConfig createConnectionConfig(java.net.InetAddress address, int port)
protected java.util.List getConnectionConfigList(java.util.Map qualifiers, java.net.InetAddress address)
address
-
protected final int getKeyedInteger(java.util.Map qualifiers, java.lang.String key, int defaultVal)
qualifiers
-
protected final int[] getKeyedIntegerArray(java.util.Map qualifiers, java.lang.String key, int[] defaultVal)
public final java.lang.String getPluginName()
public final java.lang.String getProtocolName()
getProtocolName
in interface Plugin
getProtocolName
in class AbstractPlugin
public final boolean isProtocolSupported(java.net.InetAddress address)
isProtocolSupported
in interface Plugin
isProtocolSupported
in class AbstractPlugin
address
- The address to check for support.
public final boolean isProtocolSupported(java.net.InetAddress address, java.util.Map qualifiers)
isProtocolSupported
in interface Plugin
isProtocolSupported
in class AbstractPlugin
address
- The address to check for support.qualifiers
- The map where qualification are set by the plugin.
protected void populateConnectionConfig(ConnectionConfig config, java.util.Map qualifiers)
config
- protected boolean preconnectCheck(ConnectionConfig config)
config
-
protected void saveConfig(java.util.Map qualifiers, ConnectionConfig config)
config
- protected final void saveKeyedInteger(java.util.Map qualifiers, java.lang.String key, int value)
public final void setPluginName(java.lang.String pluginName)
pluginName
- The pluginName to set.protected java.net.Socket wrapSocket(java.net.Socket socket, ConnectionConfig config) throws java.lang.Exception
socket
- config
-
java.security.KeyManagementException
java.io.IOException
java.lang.Exception
|
OpenNMS API 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |