org.opennms.netmgt.provision.support
Class AsyncAbstractDetector

java.lang.Object
  extended by org.opennms.netmgt.provision.support.AsyncAbstractDetector
All Implemented Interfaces:
AsyncServiceDetector, ServiceDetector
Direct Known Subclasses:
AsyncBasicDetector

public abstract class AsyncAbstractDetector
extends Object
implements AsyncServiceDetector

Abstract AsyncAbstractDetector class.

Version:
$Id: $
Author:
thedesloge

Constructor Summary
protected AsyncAbstractDetector(String serviceName, int port)
          Constructor for AsyncAbstractDetector.
protected AsyncAbstractDetector(String serviceName, int port, int timeout, int retries)
          Constructor for AsyncAbstractDetector.
 
Method Summary
abstract  void dispose()
          dispose
 int getPort()
          getPort
 int getRetries()
          getRetries
 String getServiceName()
          getServiceName
 int getTimeout()
          getTimeout
 void init()
          init
abstract  DetectFuture isServiceDetected(InetAddress address, DetectorMonitor monitor)
          isServiceDetected
protected abstract  void onInit()
          onInit
 void setPort(int port)
          setPort
 void setRetries(int retries)
          setRetries
 void setServiceName(String serviceName)
          Service name is mutable so that we can create new instances of each implementation and define a new service detector using the underlying protocol.
 void setTimeout(int timeout)
          setTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncAbstractDetector

protected AsyncAbstractDetector(String serviceName,
                                int port)

Constructor for AsyncAbstractDetector.

Parameters:
serviceName - a String object.
port - a int.

AsyncAbstractDetector

protected AsyncAbstractDetector(String serviceName,
                                int port,
                                int timeout,
                                int retries)

Constructor for AsyncAbstractDetector.

Parameters:
serviceName - a String object.
port - a int.
timeout - a int.
retries - a int.
Method Detail

init

public void init()

init

Specified by:
init in interface ServiceDetector

onInit

protected abstract void onInit()

onInit


isServiceDetected

public abstract DetectFuture isServiceDetected(InetAddress address,
                                               DetectorMonitor monitor)
                                        throws Exception

isServiceDetected

Specified by:
isServiceDetected in interface AsyncServiceDetector
Parameters:
address - a InetAddress object.
monitor - a DetectorMonitor object.
Returns:
a DetectFuture object.
Throws:
Exception - if any.

dispose

public abstract void dispose()

dispose

Specified by:
dispose in interface ServiceDetector

setPort

public void setPort(int port)

setPort

Parameters:
port - a int.

getPort

public int getPort()

getPort

Returns:
a int.

setRetries

public void setRetries(int retries)

setRetries

Parameters:
retries - a int.

getRetries

public int getRetries()

getRetries

Returns:
a int.

setTimeout

public void setTimeout(int timeout)

setTimeout

Parameters:
timeout - a int.

getTimeout

public int getTimeout()

getTimeout

Returns:
a int.

setServiceName

public void setServiceName(String serviceName)
Service name is mutable so that we can create new instances of each implementation and define a new service detector using the underlying protocol.

Specified by:
setServiceName in interface ServiceDetector
Parameters:
serviceName - a String object.

getServiceName

public String getServiceName()

getServiceName

Specified by:
getServiceName in interface ServiceDetector
Returns:
a String object.


Copyright © 2011. All Rights Reserved.