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: package com.sun.jumpimpl.os;
25:
26: import com.sun.jump.os.JUMPOSInterface;
27: import com.sun.jump.os.JUMPMessageQueueInterface;
28:
29: /**
30: * <code>JUMPOSInterface</code> needs to be implemented to fulfill
31: * the OS dependencies in the JUMP system.
32: */
33: public class JUMPOSInterfaceImpl extends JUMPOSInterface {
34: public JUMPOSInterfaceImpl() {
35: super ();
36: }
37:
38: /**
39: * Set testing mode. A "TESTING_MODE" message is sent to the
40: * server. The 'filePrefix' argument tells the server where
41: * the stdout and stderr output files should go.
42: */
43: public native void setTestingMode(String filePrefix);
44:
45: /**
46: * Shutdown the server
47: */
48: public native void shutdownServer();
49:
50: /**
51: * Create a process and return a unique integer ID designating it.
52: */
53: public native int createProcess(String[] args);
54:
55: /**
56: * Create a native process and return a unique integer ID designating it.
57: */
58: public native int createProcessNative(String[] args);
59:
60: /**
61: * Return the current process ID.
62: */
63: public native int getProcessID();
64:
65: /**
66: * Return the executive process ID.
67: */
68: public native int getExecutiveProcessID();
69:
70: /**
71: * Get the message queue interface
72: */
73: public JUMPMessageQueueInterface getQueueInterface() {
74: return new JUMPMessageQueueInterfaceImpl();
75: }
76: }
|