public class ExecServer extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DISABLE_BINDING
Name of the property that prevents binding of this object with the naming service.
|
static int |
MILLIS |
protected String |
name
Object key name.
|
static String |
PRINT_IOR_PROPERTY
Name of the property that prints the server's IOR or RMI handle.
|
static String |
STATUS_FPI
Status DTD formal public identifier.
|
static String |
STATUS_URL
Status DTD system identifier.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ExecServer(String name) |
|
ExecServer(String name,
String className)
Create a new executable server.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
callLocalServerManager(int port,
String user,
String password,
String method,
List params)
Call the server manager on the local system.
|
byte[] |
control(byte[] command)
Control this server.
|
String |
getName()
Get my name.
|
Object |
getServant()
Return the servant for this executable server.
|
String |
getServerClassName()
Return the server's class name.
|
String |
getServerStatus()
Return status of this server.
|
static void |
main(String[] argv)
Start a server.
|
static void |
runInitializers()
Run all initializers.
|
int |
setSystemProperty(String key,
String value)
Set a system property.
|
int |
shutdown()
Shut down and exit.
|
public static final int MILLIS
protected String name
public static final String STATUS_FPI
public static final String STATUS_URL
public static final String PRINT_IOR_PROPERTY
public static final String DISABLE_BINDING
protected ExecServer(String name)
public ExecServer(String name, String className) throws ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException, DOMException, UnknownHostException
name - Name of the serverclassName - Name of class that implements the server.ClassNotFoundException - If the class for className can't be found.NoSuchMethodException - If the constructor for className taking a single ExecServer
can't be found.InstantiationException - If the class for className is abstract or is an interface.IllegalAccessException - If the class for className isn't public.InvocationTargetException - If an exception occurs in the constructor for className.DOMException - If the server's status document can't be created.UnknownHostException - If the local host name can't be determined.public static void main(String[] argv)
argv - The command-line argumentspublic String getName()
public Object getServant()
public byte[] control(byte[] command)
command - Command to send to the server.public String getServerClassName()
public String getServerStatus()
public int setSystemProperty(String key, String value)
key - Property's name.value - New value.public Object callLocalServerManager(int port, String user, String password, String method, List params) throws IOException, org.apache.xmlrpc.XmlRpcException
port - What port on the local system the server manager is listening.user - User name to use for authentication.password - Authenticator for user.method - What method in the server manager to call.params - Parameters to pass to the method named by method.Exception - If any error occurs.IOExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic int shutdown()
public static void runInitializers()
throws EDAException
Initializer.initialize() method of each
initializer specified by class name in a comma separated list of classes in the
system properties. The property name is org.apache.oodt.commons.initializers, or
if not defined, org.apache.oodt.commons.ExecServer.initializers, or if not
defined, initializers. And if that one's not defined, then none
are run.EDAException - if an error occurs.Copyright © 1999–2017 Apache OODT. All rights reserved.