|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JdmkLegacyConnector
.
public interface ClientNotificationHandler
This interface specifies the methods for a connector to allow a listener to receive notifications from a remote MBean in an agent.
To forward a notification from the agent to the connector client, the user can configure the connector to use either push or pull mode.
Field Summary | |
---|---|
static int |
DISCARD_NEW
Deprecated. This constant controls the cache behavior for notification forwarding. |
static int |
DISCARD_OLD
Deprecated. This constant controls the cache behavior for notification forwarding. |
static int |
NO_CACHE_LIMIT
Deprecated. This constant controls the cache behavior for notification forwarding. |
static int |
PULL_MODE
Deprecated. This constant is used to set the pull mode for notification forwarding. |
static int |
PUSH_MODE
Deprecated. This constant is used to set the push mode for notification forwarding. |
Method Summary | |
---|---|
void |
clearCache()
Deprecated. Clear the notification cache. |
int |
getCacheSize()
Deprecated. Gets the cache size of notifications waiting to be forwarded. |
int |
getMode()
Deprecated. Gets the notification forwarding mode. |
void |
getNotifications()
Deprecated. Retrieves all notifications in the cache. |
int |
getOverflowCount()
Deprecated. Gets the number of notifications discarded because the cache limit has been reached. |
int |
getOverflowMode()
Deprecated. Returns whether to discard the oldest message ( DISCARD_OLD ) or the
the newest message (DISCARD_NEW ), if the cache size exceeds. |
int |
getPeriod()
Deprecated. Gets the period for notification forwarding in milliseconds. |
int |
setCacheSize(int size,
boolean discardOverflow)
Deprecated. Sets the cache size of notifications waiting to be forwarded. |
void |
setMode(int mode)
Deprecated. Sets the notification forwarding mode. |
void |
setOverflowCount(int count)
Deprecated. Sets the number of notifications discarded, this number indicates the number of notifications discarded because the cache limit has been reached. |
void |
setOverflowMode(int of)
Deprecated. Specifies whether to discard the oldest message ( DISCARD_OLD ) or the
the newest message (DISCARD_NEW ), if the cache size exceeds. |
void |
setPeriod(int period)
Deprecated. Specifies the period for notification forwarding in milliseconds. |
Methods inherited from interface com.sun.jdmk.NotificationRegistration |
---|
addNotificationListener, removeNotificationListener |
Field Detail |
---|
static final int PUSH_MODE
static final int PULL_MODE
static final int DISCARD_OLD
static final int DISCARD_NEW
static final int NO_CACHE_LIMIT
Method Detail |
---|
void setMode(int mode) throws IllegalArgumentException
PUSH_MODE
, it is the agent to push notifications to the client, if set to
PULL_MODE
, it is the client to retrieve notifications from the agent.
The default value is PUSH_MODE
.
mode
- set to PUSH_MODE
or PULL_MODE
.
IllegalArgumentException
- Thrown if the mode is not equal to
PUSH_MODE
nor PULL_MODE
.int getMode()
PUSH_MODE
, it is the agent to push notifications to the client, if set to
PULL_MODE
, it is the client to retrieve notifications from the agent.
The default value is PUSH_MODE
.
void getNotifications()
void clearCache()
void setPeriod(int period)
If set to equal to or less than zero and the pull mode is used, no pull will be done. A user should
explicitly call getNotifications
to retrieve all notifications in the cache.
This method has no effect in the push mode in the current implementation.
The default value is 1000 milliseconds.
period
- The period in milliseconds.int getPeriod()
The default value is 1000 milliseconds.
int setCacheSize(int size, boolean discardOverflow)
If set to NO_CACHE_LIMIT
, notifications will never be discarded,
but this may lead to OutOfMemory errors under stressed conditions. If set to zero, any
notification will be discarded without being sent.
The default value is NO_CACHE_LIMIT
.
size
- the maximum number of notifications in the cache.discardOverflow
- effective only if current number of cached notifications exceeds the new size:
if true, discard excess notifications; if false, the cache size will not be changed.
int getCacheSize()
If set to NO_CACHE_LIMIT
, notifications will never be discarded,
but this may lead to OutOfMemory errors under stressed conditions.
The default value is NO_CACHE_LIMIT
.
void setOverflowCount(int count)
This count will be reset to zero if no more listener exists at the client side, because in this case the notification server will remove all information about this notification client.
count
- The new value to set to overflow count.int getOverflowCount()
This count will be reset to zero if no more listener exists at the client side, because in this case the notification server will remove all information about this notification client.
void setOverflowMode(int of) throws IllegalArgumentException
DISCARD_OLD
) or the
the newest message (DISCARD_NEW
), if the cache size exceeds.
The default mode is DISCARD_OLD
.
of
- The mode to specify.
IllegalArgumentException
- Thrown if the mode is not DISCARD_NEW
nor DISCARD_OLD
.int getOverflowMode()
DISCARD_OLD
) or the
the newest message (DISCARD_NEW
), if the cache size exceeds.
The default mode is DISCARD_OLD
.
|
Open Source build 02 opendmk-1.0-b02 2007.10.01_19:17:46_MEST |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |