org.opennms.netmgt.provision.detector.jmx.client
Class JMXClient

java.lang.Object
  extended by org.opennms.netmgt.provision.detector.jmx.client.JMXClient
All Implemented Interfaces:
Client<ConnectionWrapper,Integer>
Direct Known Subclasses:
JBossClient, Jsr160Client

public abstract class JMXClient
extends Object
implements Client<ConnectionWrapper,Integer>

Abstract JMXClient class.

Version:
$Id: $
Author:
Donald Desloge

Constructor Summary
JMXClient()
           
 
Method Summary
 void close()
          close
 void connect(InetAddress address, int port, int timeout)
          connect
protected abstract  Map<String,Object> generateMap(int port, int timeout)
          generateMap
protected abstract  ConnectionWrapper getMBeanServerConnection(Map<String,Object> parameterMap, InetAddress address)
          getMBeanServerConnection
 Integer receiveBanner()
          receiveBanner
 Integer sendRequest(ConnectionWrapper request)
          sendRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMXClient

public JMXClient()
Method Detail

close

public void close()

close

Specified by:
close in interface Client<ConnectionWrapper,Integer>

getMBeanServerConnection

protected abstract ConnectionWrapper getMBeanServerConnection(Map<String,Object> parameterMap,
                                                              InetAddress address)

getMBeanServerConnection

Parameters:
parameterMap - a Map object.
address - a InetAddress object.
Returns:
a ConnectionWrapper object.

generateMap

protected abstract Map<String,Object> generateMap(int port,
                                                  int timeout)

generateMap

Parameters:
port - a int.
timeout - a int.
Returns:
a Map object.

connect

public void connect(InetAddress address,
                    int port,
                    int timeout)
             throws IOException,
                    Exception

connect

Specified by:
connect in interface Client<ConnectionWrapper,Integer>
Parameters:
address - a InetAddress object.
port - a int.
timeout - a int.
Throws:
IOException - if any.
Exception - if any.

receiveBanner

public Integer receiveBanner()
                      throws IOException,
                             Exception

receiveBanner

Specified by:
receiveBanner in interface Client<ConnectionWrapper,Integer>
Returns:
a Integer object.
Throws:
IOException - if any.
Exception - if any.

sendRequest

public Integer sendRequest(ConnectionWrapper request)
                    throws IOException,
                           Exception

sendRequest

Specified by:
sendRequest in interface Client<ConnectionWrapper,Integer>
Parameters:
request - a ConnectionWrapper object.
Returns:
a Integer object.
Throws:
IOException - if any.
Exception - if any.


Copyright © 2011. All Rights Reserved.