|
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.RMIPushEventRelay
public class RMIPushEventRelay extends Object implements EventRelay
This class is an implementation of the EventRelay interface, using
push mode. It exports an RMI object that RMIPushEventForwarder uses
to forward notifications.
| Constructor and Description |
|---|
RMIPushEventRelay(EventClientDelegateMBean delegate)
Constructs a default RMIPushEventRelay object
and exports its notification
receiver on any free port. |
RMIPushEventRelay(EventClientDelegateMBean delegate,
int port,
RMIClientSocketFactory csf,
RMIServerSocketFactory ssf,
int bufferSize)
Constructs a RMIPushEventRelay object and exports its
notification receiver on a specified port. |
| Modifier and Type | Method and Description |
|---|---|
String |
getClientId()
Returns an identifier that is used by this EventRelay to identify
the client when communicating with the EventClientDelegateMBean. |
void |
setEventReceiver(EventReceiver receiver)
This method is called by EventClient to register a callback
to receive notifications from an EventClientDelegateMBean object. |
void |
stop()
Stops receiving and forwarding notifications and performs any necessary cleanup. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RMIPushEventRelay(EventClientDelegateMBean delegate)
throws IOException,
MBeanException
RMIPushEventRelay object
and exports its notification
receiver on any free port. This constructor is equivalent
to RMIPushEventRelay(delegate, 0, null, null, <default buffer
size>).
delegate - The EventClientDelegateMBean proxy to work with.IOException - if failed to communicate with
EventClientDelegateMBean.MBeanException - if the EventClientDelegateMBean failed
to create an EventForwarder for this object.
public RMIPushEventRelay(EventClientDelegateMBean delegate,
int port,
RMIClientSocketFactory csf,
RMIServerSocketFactory ssf,
int bufferSize)
throws IOException,
MBeanException
RMIPushEventRelay object and exports its
notification receiver on a specified port.
delegate - The EventClientDelegateMBean proxy to work with.port - The port used to export an RMI object to receive notifications
from a server. If the port is zero, an anonymous port is used.csf - The client socket factory used to export the RMI object.
Can be null.ssf - The server socket factory used to export the RMI object.
Can be null.bufferSize - The number of notifications held on the server
while waiting for the previous transmission to complete. A value of
zero means the default buffer size.IOException - if failed to communicate with
EventClientDelegateMBean.MBeanException - if the EventClientDelegateMBean failed
to create an EventForwarder for this object.RMIPushEventForwarder.RMIPushEventForwarder(RMIPushServer, int)| Method Detail |
|---|
public String getClientId()
EventRelayEventRelay to identify
the client when communicating with the EventClientDelegateMBean.
This identifier is obtained by calling
EventClientDelegateMBean.addClient.
It is the EventRelay that calls EventClientDelegateMBean to obtain
the client identifier because it is the EventRelay that decides
how to get notifications from the EventClientDelegateMBean,
by creating the appropriate EventForwarder.
getClientId in interface EventRelaypublic void setEventReceiver(EventReceiver receiver)
EventRelayEventClient to register a callback
to receive notifications from an EventClientDelegateMBean object.
A null value is allowed, which means that the EventClient suspends
reception of notifications, so that the EventRelay can decide to stop receiving
notifications from its EventForwarder.
setEventReceiver in interface EventRelayreceiver - An EventClient callback to receive
events.public void stop()
EventRelayEventClient will never
call any other methods of this object.
stop in interface EventRelayEventClient.close()
|
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.