01: /*
02: * Copyright 1990-2006 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.jumpimpl.module.lifecycle.remote;
26:
27: import com.sun.jump.executive.JUMPIsolateProxy;
28: import com.sun.jump.executive.JUMPApplicationProxy;
29: import com.sun.jump.module.JUMPModule;
30: import com.sun.jump.common.JUMPAppModel;
31: import com.sun.jump.common.JUMPProcessProxy;
32: import com.sun.jump.common.JUMPApplication;
33:
34: import com.sun.jump.module.lifecycle.JUMPApplicationLifecycleModule;
35: import com.sun.jump.module.lifecycle.remote.JUMPApplicationLifecycleModuleRemote;
36: import com.sun.jump.module.lifecycle.remote.JUMPApplicationProxyRemote;
37:
38: import java.rmi.Remote;
39: import java.rmi.RemoteException;
40:
41: /**
42: * <code>JUMPApplicationProxyRemote</code> is an remote module
43: * to the <code>JUMPApplicationProxy</code> object in the executive.
44: * This can be used to control lifecycle operations of an application
45: * running in another Isolate.
46: */
47: public class ApplicationProxyRemoteImpl implements
48: JUMPApplicationProxyRemote {
49:
50: JUMPApplicationProxy appProxy;
51:
52: public ApplicationProxyRemoteImpl(JUMPApplicationProxy appProxy) {
53: this .appProxy = appProxy;
54: }
55:
56: /**
57: * Returns the <code>JUMPApplication</code> this proxy is associated with.
58: */
59: public JUMPApplication getApplication() throws RemoteException {
60: return appProxy.getApplication();
61: }
62:
63: /**
64: * Pauses the application associated with this
65: * <code>JUMPApplicationProxy</code>.
66: **/
67: public void pauseApp() throws RemoteException {
68: appProxy.pauseApp();
69: }
70:
71: /**
72: * Resumes the application associated with this
73: * <code>JUMPApplicationProxy</code>.
74: **/
75: public void resumeApp() throws RemoteException {
76: appProxy.resumeApp();
77: }
78:
79: /**
80: * Destroys the application associated with this
81: * <code>JUMPApplicationProxy</code>.
82: **/
83: public void destroyApp() throws RemoteException {
84: appProxy.destroyApp();
85: }
86:
87: /**
88: * Returns the state of the application associated with this
89: * <code>JUMPApplicationProxy</code>.
90: **/
91: public int getAppState() throws RemoteException {
92: return appProxy.getAppState();
93: }
94: }
|