01: /*
02: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
03: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
04: *
05: * This program is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU General Public License version
07: * 2 only, as published by the Free Software Foundation.
08: *
09: * This program is distributed in the hope that it will be useful, but
10: * WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * General Public License version 2 for more details (a copy is
13: * included at /legal/license.txt).
14: *
15: * You should have received a copy of the GNU General Public License
16: * version 2 along with this work; if not, write to the Free Software
17: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18: * 02110-1301 USA
19: *
20: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
21: * Clara, CA 95054 or visit www.sun.com if you need additional
22: * information or have any questions.
23: */
24:
25: package com.sun.midp.jump.push.executive;
26:
27: import com.sun.midp.jump.push.executive.remote.MIDPContainerInterface;
28: import com.sun.midp.jump.push.share.JUMPReservationDescriptor;
29: import java.io.IOException;
30: import java.rmi.RemoteException;
31: import javax.microedition.io.ConnectionNotFoundException;
32:
33: /** Small wrapper class. */
34: final class MIDPContainerInterfaceImpl implements
35: MIDPContainerInterface {
36: /** Push controller. */
37: private final PushController pushController;
38:
39: /**
40: * Creates a wrapper.
41: *
42: * @param pushController push controller to use
43: */
44: public MIDPContainerInterfaceImpl(
45: final PushController pushController) {
46: this .pushController = pushController;
47: }
48:
49: /** {@inheritDoc} */
50: public void registerConnection(final int midletSuiteId,
51: final String midlet,
52: final JUMPReservationDescriptor reservationDescriptor)
53: throws IOException, RemoteException {
54: pushController.registerConnection(midletSuiteId, midlet,
55: reservationDescriptor);
56: }
57:
58: /** {@inheritDoc} */
59: public boolean unregisterConnection(final int midletSuiteId,
60: final String connectionName) throws SecurityException,
61: RemoteException {
62: return pushController.unregisterConnection(midletSuiteId,
63: connectionName);
64: }
65:
66: /** {@inheritDoc} */
67: public String[] listConnections(final int midletSuiteId,
68: final boolean available) throws RemoteException {
69: return pushController.listConnections(midletSuiteId, available);
70: }
71:
72: /** {@inheritDoc} */
73: public String getMIDlet(final int midletSuiteID,
74: final String connectionName) throws RemoteException {
75: return pushController.getMIDlet(midletSuiteID, connectionName);
76: }
77:
78: /** {@inheritDoc} */
79: public String getFilter(final int midletSuiteID,
80: final String connectionName) throws RemoteException {
81: return pushController.getFilter(midletSuiteID, connectionName);
82: }
83:
84: /** {@inheritDoc} */
85: public long registerAlarm(final int midletSuiteId,
86: final String midlet, final long time)
87: throws RemoteException, ConnectionNotFoundException {
88: return pushController
89: .registerAlarm(midletSuiteId, midlet, time);
90: }
91: }
|