01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: package mx4j.remote.rmi;
10:
11: import java.io.IOException;
12: import java.util.Map;
13: import javax.management.remote.NotificationResult;
14: import javax.management.remote.rmi.RMIConnection;
15:
16: import mx4j.remote.AbstractRemoteNotificationClientHandler;
17: import mx4j.remote.ConnectionNotificationEmitter;
18: import mx4j.remote.HeartBeat;
19:
20: /**
21: * RMI-specific RemoteNotificationClientHandler.
22: *
23: * @version $Revision: 1.3 $
24: */
25: public class RMIRemoteNotificationClientHandler extends
26: AbstractRemoteNotificationClientHandler {
27: private final RMIConnection connection;
28:
29: public RMIRemoteNotificationClientHandler(RMIConnection connection,
30: ConnectionNotificationEmitter emitter, HeartBeat heartbeat,
31: Map environment) {
32: super (emitter, heartbeat, environment);
33: this .connection = connection;
34: }
35:
36: protected NotificationResult fetchNotifications(long sequence,
37: int maxNumber, long timeout) throws IOException {
38: return connection.fetchNotifications(sequence, maxNumber,
39: timeout);
40: }
41: }
|