|
Java™ Platform Standard Ed. 7 DRAFT ea-b76 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.management.event.FetchingEventForwarder
public class FetchingEventForwarder extends Object implements EventForwarder
This class is used by FetchingEventRelay. When
FetchingEventRelay calls EventClientDelegateMBean.addClient(String, Object[], String[]) to get a new
client identifier, it uses
this class name as the first argument to ask EventClientDelegateMBean
to create an object of this class.
Then EventClientDelegateMBean forwards client notifications
to this object.
When FetchingEventRelay calls
EventClientDelegateMBean.fetchNotifications(String, long, int, long)
to fetch notifications, the EventClientDelegateMBean will forward
the call to this object.
| Constructor and Description |
|---|
FetchingEventForwarder(int bufferSize)
Construct a new FetchingEventForwarder with the given
buffer size. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Informs the EventForwarder to shut down. |
NotificationResult |
fetchNotifications(long startSequenceNumber,
int maxNotifs,
long timeout)
Called by an EventClientDelegateMBean to forward a user call
EventClientDelegateMBean.fetchNotifications(String, long, int, long). |
void |
forward(Notification n,
Integer listenerId)
Forwards a notification. |
void |
setClientId(String clientId)
Sets an event client identifier created by EventClientDelegateMBean. |
protected void |
setList(List<TargetedNotification> list)
Sets a user specific list to save notifications in server side before forwarding to an FetchingEventRelay in client side. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FetchingEventForwarder(int bufferSize)
FetchingEventForwarder with the given
buffer size.
bufferSize - the size of the buffer that will store notifications
until they have been fetched and acknowledged by the client.| Method Detail |
|---|
public NotificationResult fetchNotifications(long startSequenceNumber,
int maxNotifs,
long timeout)
EventClientDelegateMBean to forward a user call
EventClientDelegateMBean.fetchNotifications(String, long, int, long).
A call of this method is considered to acknowledge reception of all
notifications whose sequence numbers are less the
startSequenceNumber, so all these notifications can be deleted
from this object.
startSequenceNumber - The first sequence number to
consider.timeout - The maximum waiting time in milliseconds.
If no notifications have arrived after this period of time, the call
will return with an empty list of notifications.maxNotifs - The maximum number of notifications to return.
public void forward(Notification n,
Integer listenerId)
throws IOException
fetchNotifications to pick
it up.
forward in interface EventForwardern - The notification to be forwarded to a remote listener.listenerId - The identifier of the listener to receive the notification.IOException - If it is closed or an I/O error occurs.
public void close()
throws IOException
EventForwarderEventForwarder to shut down.
After this method is called, any call to the method
forward(Notification, Integer) may get an IOException.
close in interface EventForwarderIOException - If an I/O error occurs.
public void setClientId(String clientId)
throws IOException
EventForwarderEventClientDelegateMBean.
This method will be called just after this EventForwarder
is constructed and before calling the forward method to forward any
notifications.
setClientId in interface EventForwarderIOExceptionprotected void setList(List<TargetedNotification> list)
This method should be called before any notification is forwarded to this forwader.
list - a user specific list to save notifications
|
Java™ Platform Standard Ed. 7 DRAFT ea-b76 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.