Please note that this documentation is not final and is subject to change.

Java™ Platform
Standard Ed. 7

DRAFT ea-b76

javax.management.event
Class RMIPushEventForwarder

java.lang.Object
  extended by javax.management.event.RMIPushEventForwarder
All Implemented Interfaces:
EventForwarder

public class RMIPushEventForwarder
extends Object
implements EventForwarder

This class is used by RMIPushEventRelay. When RMIPushEventRelay 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. This object then continues forwarding the notifications to the RMIPushEventRelay.


Constructor Summary
Constructor and Description
RMIPushEventForwarder(RMIPushServer receiver, int bufferSize)
          Creates a new instance of RMIPushEventForwarder.
 
Method Summary
Modifier and Type Method and Description
 void close()
          Informs the EventForwarder to shut down.
 void forward(Notification n, Integer listenerId)
          Forwards a notification.
 void setClientId(String clientId)
          Sets an event client identifier created by EventClientDelegateMBean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMIPushEventForwarder

public RMIPushEventForwarder(RMIPushServer receiver,
                             int bufferSize)
Creates a new instance of RMIPushEventForwarder.

Parameters:
receiver - An RMI stub exported to receive notifications from this object for its RMIPushEventRelay.
bufferSize - The maximum number of notifications to store while waiting for the last remote send to complete.
Method Detail

forward

public void forward(Notification n,
                    Integer listenerId)
Description copied from interface: EventForwarder
Forwards a notification.

Specified by:
forward in interface EventForwarder
Parameters:
n - The notification to be forwarded to a remote listener.
listenerId - The identifier of the listener to receive the notification.

close

public void close()
Description copied from interface: EventForwarder
Informs the EventForwarder to shut down.

After this method is called, any call to the method forward(Notification, Integer) may get an IOException.

Specified by:
close in interface EventForwarder

setClientId

public void setClientId(String clientId)
Description copied from interface: EventForwarder
Sets an event client identifier created by EventClientDelegateMBean.

This method will be called just after this EventForwarder is constructed and before calling the forward method to forward any notifications.

Specified by:
setClientId in interface EventForwarder

Java™ Platform
Standard Ed. 7

DRAFT ea-b76

Submit a bug or feature

Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.