|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
NotificationWrapper is a "wide" read only interface providing "unstructured" access to agent internals and paylod carried by notifications. The alternatives were: 1. Precompile assumptions regarding the notification stucture and its payload in the trap factory 2. Use introspection but with a potential large execution overhead. The use of delegated wrappers stands somewhere in the middle. Trap factory can be extended with the definition and use of new wpappers that will be able to cope with any kind of notfications. Run time overhead is minimal as wrappers can be instantiated only once. Tags used to locate attributes in the notification fixed (i.e. excluding user defined fields) payload are defined. Implementations should not use these tags in any of the notification payload. To avoid conflicts the following convention is proposed: standard notification payload is qualified by the "n:" prefix. Agent properties are qualified by the "a:" prefix. User defined payload can be qualified with e.g. the "u:" prefix
Field Summary | |
static java.lang.String |
ALL_TAG
|
static java.lang.String |
CLASS_TAG
|
static java.lang.String |
MESSAGE_TAG
|
static java.lang.String |
SEQNO_TAG
|
static java.lang.String |
STARTTIME_TAG
|
static java.lang.String |
TRAPCOUNT_TAG
|
static java.lang.String |
TSTAMP_TAG
|
static java.lang.String |
TYPE_TAG
|
static java.lang.String |
UPTIME_TAG
|
Method Summary | |
java.lang.Object |
get(java.lang.String attrTag)
Defines the communication protocol between the caller and the data source (notification). |
void |
prime(Notification (src) n)
Sets notification to be used as the data source |
void |
set(Clock (src) uptime,
Counter (src) count)
Sets the uptime clock and trap counter |
Field Detail |
public static final java.lang.String MESSAGE_TAG
public static final java.lang.String SEQNO_TAG
public static final java.lang.String TSTAMP_TAG
public static final java.lang.String TYPE_TAG
public static final java.lang.String ALL_TAG
public static final java.lang.String CLASS_TAG
public static final java.lang.String STARTTIME_TAG
public static final java.lang.String UPTIME_TAG
public static final java.lang.String TRAPCOUNT_TAG
Method Detail |
public void set(Clock (src) uptime, Counter (src) count)
public void prime(Notification (src) n)
n
- the notification to be used as a data source at subsequent calls
of method getpublic java.lang.Object get(java.lang.String attrTag) throws MappingFailedException (src)
attrTag
- the tag of the attribute the value of which is required
MappingFailedException (src)
- if for any reason the requested attribute
can not be found
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |