站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 varia API Documentation 英文版文档

NotificationWrapperSupport (Various API) - JBoss 4.0.1 sp1 varia API Documentation 英文版文档


org.jboss.jmx.adaptor.snmp.agent
Class NotificationWrapperSupport

java.lang.Object
  extended byorg.jboss.jmx.adaptor.snmp.agent.NotificationWrapperSupport
All Implemented Interfaces:
NotificationWrapper

public class NotificationWrapperSupport
extends Object
implements NotificationWrapper

NotificationWrapperSupport provides a base NotificationWrapper implementation

Version:
$Revision: 1.2.6.1 $
Author:
Spyros Pollatos, Dimitris Andreadis

Field Summary
protected  Clock clock
          Provides uptime
protected  Map payload
          Holds the notification payload keyed on the attibute name
protected  Counter trapCount
          Provides trap count
 
Fields inherited from interface org.jboss.jmx.adaptor.snmp.agent.NotificationWrapper
ALL_TAG, CLASS_TAG, MESSAGE_TAG, SEQNO_TAG, STARTTIME_TAG, TRAPCOUNT_TAG, TSTAMP_TAG, TYPE_TAG, UPTIME_TAG
 
Constructor Summary
NotificationWrapperSupport()
          CTOR
 
Method Summary
 Object get(String tagName)
          Implements the communication protocol between the caller and the data source (notification and agent) based on tags.
 void prime(javax.management.Notification n)
          Set the notification to be used as the data source.
 void set(Clock uptime, Counter count)
          Loads the hashmap with the DCAs of interest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

payload

protected Map payload
Holds the notification payload keyed on the attibute name


clock

protected Clock clock
Provides uptime


trapCount

protected Counter trapCount
Provides trap count

Constructor Detail

NotificationWrapperSupport

public NotificationWrapperSupport()
CTOR

Method Detail

set

public void set(Clock uptime,
                Counter count)
Loads the hashmap with the DCAs of interest. Note that the keys are used as attribute tags in the mapping resource file

Specified by:
set in interface NotificationWrapper

prime

public void prime(javax.management.Notification n)
Set the notification to be used as the data source. Load the hashmap with all of the notification contents. Note that the keys are used as attribute tags in the mapping resource file

Specified by:
prime in interface NotificationWrapper
Parameters:
n - the notification to be used as data source at subsequent calls of get()

get

public Object get(String tagName)
           throws MappingFailedException
Implements the communication protocol between the caller and the data source (notification and agent) based on tags. Implementations are expected to map the provided attribute name to some aspect of the notification payload. The later is defined by method prime.

Specified by:
get in interface NotificationWrapper
Parameters:
tagName - the tag of the attribute the value of which is required
Returns:
the content attrTag maps to
Throws:
MappingFailedException - if for any reason the requested attribute can not be found


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.