|
|||||||||
| 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
public abstract class 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.
| Constructor Summary | |
|---|---|
protected |
AbstractTcpPlugin(String protocol,
int defaultTimeout,
int defaultRetry)
|
protected |
AbstractTcpPlugin(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(Socket socket,
ConnectionConfig config)
|
protected void |
closeSocket(Socket socket,
ConnectionConfig config)
|
protected ConnectionConfig |
createConnectionConfig(InetAddress address,
int port)
|
protected List<ConnectionConfig> |
getConnectionConfigList(Map<String,Object> qualifiers,
InetAddress address)
|
protected int |
getKeyedInteger(Map<String,Object> qualifiers,
String key,
int defaultVal)
|
protected int[] |
getKeyedIntegerArray(Map<String,Object> qualifiers,
String key,
int[] defaultVal)
|
String |
getPluginName()
|
String |
getProtocolName()
Returns the name of the protocol that this plugin checks on the target system for support. |
boolean |
isProtocolSupported(InetAddress address)
Returns true if the protocol defined by this plugin is supported. |
boolean |
isProtocolSupported(InetAddress address,
Map<String,Object> qualifiers)
Returns true if the protocol defined by this plugin is supported. |
protected void |
populateConnectionConfig(ConnectionConfig config,
Map<String,Object> qualifiers)
|
protected boolean |
preconnectCheck(ConnectionConfig config)
|
protected void |
saveConfig(Map<String,Object> qualifiers,
ConnectionConfig config)
|
protected void |
saveKeyedInteger(Map<String,Object> qualifiers,
String key,
int value)
|
void |
setPluginName(String pluginName)
|
protected Socket |
wrapSocket(Socket socket,
ConnectionConfig config)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractTcpPlugin(String protocol,
int defaultTimeout,
int defaultRetry)
protected AbstractTcpPlugin(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(Socket socket,
ConnectionConfig config)
protected abstract boolean checkProtocol(Socket socket,
ConnectionConfig config)
throws Exception
Exception
protected ConnectionConfig createConnectionConfig(InetAddress address,
int port)
protected List<ConnectionConfig> getConnectionConfigList(Map<String,Object> qualifiers,
InetAddress address)
protected final int getKeyedInteger(Map<String,Object> qualifiers,
String key,
int defaultVal)
protected final int[] getKeyedIntegerArray(Map<String,Object> qualifiers,
String key,
int[] defaultVal)
public final String getPluginName()
public final String getProtocolName()
getProtocolName in interface PlugingetProtocolName in class AbstractPluginpublic final boolean isProtocolSupported(InetAddress address)
isProtocolSupported in interface PluginisProtocolSupported in class AbstractPluginaddress - The address to check for support.
public final boolean isProtocolSupported(InetAddress address,
Map<String,Object> qualifiers)
isProtocolSupported in interface PluginisProtocolSupported in class AbstractPluginaddress - The address to check for support.qualifiers - The map where qualification are set by the plugin.
protected void populateConnectionConfig(ConnectionConfig config,
Map<String,Object> qualifiers)
protected boolean preconnectCheck(ConnectionConfig config)
protected void saveConfig(Map<String,Object> qualifiers,
ConnectionConfig config)
protected final void saveKeyedInteger(Map<String,Object> qualifiers,
String key,
int value)
public final void setPluginName(String pluginName)
pluginName - The pluginName to set.
protected Socket wrapSocket(Socket socket,
ConnectionConfig config)
throws Exception
Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||