org.opennms.bb.dp.common.components
Class PollerClient

java.lang.Object
  |
  +--org.opennms.bb.dp.common.components.PollerClient
All Implemented Interfaces:
com.sun.media.jsdt.Client, Serializable
Direct Known Subclasses:
ActiondEventReceiver, CapsdDiscReceiver.CapsdDiscConsumer, DiscCapsdReceiver.DiscCapsdConsumer, DiscPingManager.ManagerClient, MonitorRequestReceiver.MonitorRequestConsumer, ServiceMonitorICMP.MonitorReplyConsumer, Trapd

public class PollerClient
extends Object
implements com.sun.media.jsdt.Client

The PollerClient class is a base class that implements the JSDT Client interface for communications with other JSDT clients.

It is up to any class that derives from the PollerClient object to set it's unique name and override the authenticate method if authentication is required.

Version:
$Revision: 1.6 $
Author:
Sowmya, OpenNMS
See Also:
Serialized Form

Field Summary
protected  String m_name
          The acutal name of the PollerClient with respect to the JSDT library.
 
Constructor Summary
private PollerClient()
          The default constructor is defined and will always throw a java.lang.UnsupportedOperationException.
  PollerClient(String name)
          Initializes a PollerClient for the derived class.
 
Method Summary
 Object authenticate(com.sun.media.jsdt.AuthenticationInfo info)
          Used to perform any required authentication by the JSDT registry or JSDT manager.
 String getName()
          Returns the name of the JSDT client as initialized by the class constructor.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

m_name

protected String m_name

The acutal name of the PollerClient with respect to the JSDT library.

Constructor Detail

PollerClient

private PollerClient()
              throws UnsupportedOperationException

The default constructor is defined and will always throw a java.lang.UnsupportedOperationException. This behavior is to prevent an actual client object from being created without a unique name as required by the JSDT engine.

Throws:
UnsupportedOperationException - Always thrown by this constructor.

PollerClient

public PollerClient(String name)

Initializes a PollerClient for the derived class. The passe string is kept internally for communications with the Java Shared Data Toolkit (JSDT).

Parameters:
name - The unique name of the JSDT client.
Method Detail

authenticate

public Object authenticate(com.sun.media.jsdt.AuthenticationInfo info)

Used to perform any required authentication by the JSDT registry or JSDT manager. The default implementation is to return a null object so that authentication is not performed.

Note: The object returned for Authentication should be serializable.

Specified by:
authenticate in interface com.sun.media.jsdt.Client
Parameters:
info - The Authentication challenge from the server.

getName

public String getName()

Returns the name of the JSDT client as initialized by the class constructor.

Specified by:
getName in interface com.sun.media.jsdt.Client
Returns:
The name of the PollerClient.