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.tools.remote.http;
10:
11: import java.io.IOException;
12: import java.util.Map;
13: import javax.management.remote.NotificationResult;
14:
15: import mx4j.remote.AbstractRemoteNotificationClientHandler;
16: import mx4j.remote.ConnectionNotificationEmitter;
17: import mx4j.remote.HeartBeat;
18:
19: /**
20: * @version $Revision: 1.3 $
21: */
22: public class HTTPRemoteNotificationClientHandler extends
23: AbstractRemoteNotificationClientHandler {
24: private final HTTPConnection connection;
25:
26: public HTTPRemoteNotificationClientHandler(
27: HTTPConnection connection,
28: ConnectionNotificationEmitter emitter, HeartBeat heartbeat,
29: Map environment) {
30: super (emitter, heartbeat, environment);
31: this .connection = connection;
32: }
33:
34: protected NotificationResult fetchNotifications(long sequence,
35: int maxNumber, long timeout) throws IOException {
36: return connection.fetchNotifications(sequence, maxNumber,
37: timeout);
38: }
39: }
|