|
jSyncManager Simple Java Server | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.jSyncManager.SJS.Server
public class Server
The Simple Java Server Internet Server Service. This executable class is used to start the Simple Java Server Internet Server Service. It takes as its sole parameter an XML data file name which it will parse to configure the server. If this parameter is not specified, the name "server.xml" will be assumed.
Field Summary |
---|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Constructor Summary | |
---|---|
Server(java.io.File file)
Creates a new instance of the Server. |
|
Server(java.lang.String filename)
Creates a new instance of the Server. |
Method Summary | |
---|---|
void |
acceptAllIncomingRequests()
Causes the server to accept all incoming requests in all services. |
void |
acceptIncomingRequests(java.net.SocketAddress address)
A method to accept incoming requests to the specified service. |
void |
acceptIncomingRequests(java.lang.String serviceName)
A method to accept incoming requests to the specified service. |
void |
acceptIncomingRequests(java.lang.String address,
int port)
A method to accept incoming requests to the specified service. |
void |
createService(java.lang.String name,
java.net.SocketAddress address,
java.lang.String adapterName)
Creates the specified service. |
void |
createService(java.lang.String name,
java.lang.String address,
int port,
java.lang.String adapterName)
Creates the specified service. |
void |
denyAllIncomingRequests()
Causes the server to deny all incoming requests in all services. |
void |
denyIncomingRequests(java.net.SocketAddress address)
A method to deny incoming requests to the specified service. |
void |
denyIncomingRequests(java.lang.String serviceName)
A method to deny incoming requests to the specified service. |
void |
denyIncomingRequests(java.lang.String address,
int port)
A method to deny incoming requests to the specified service. |
java.lang.String |
describeAllServices()
Describes all the services running on this server. |
java.lang.String |
describeAllServicesWithParameter(java.lang.String param)
Describes all the services with the specified parameter running on this server. |
java.lang.String |
describeService(java.net.SocketAddress address)
A method to describe the specified service. |
java.lang.String |
describeService(java.lang.String serviceName)
A method to describe the specified service. |
java.lang.String |
describeService(java.lang.String address,
int port)
A method to describe the specified service. |
java.lang.String |
describeServiceParameter(java.net.SocketAddress address,
java.lang.String param)
A method to describe the specified service parameter. |
java.lang.String |
describeServiceParameter(java.lang.String address,
int port,
java.lang.String param)
A method to describe the specified service parameter. |
java.lang.String |
describeServiceParameter(java.lang.String serviceName,
java.lang.String param)
A method to describe the specified service parameter. |
java.lang.String |
getAllStatus()
Retrieves the status for all services running on this server. |
java.lang.String |
getStatus(java.net.SocketAddress address)
A method to query the status of the specified service. |
java.lang.String |
getStatus(java.lang.String serviceName)
A method to query the status of the specified service. |
java.lang.String |
getStatus(java.lang.String address,
int port)
A method to query the status of the specified service. |
static void |
main(java.lang.String[] args)
The application main entry point. |
void |
removeAllServices()
Removes all services from the server. |
void |
removeParameterInAllServices(java.lang.String param)
A method to remove the specified parameter from all services. |
void |
removeService(java.net.SocketAddress address)
A method to remove the specified service. |
void |
removeService(java.lang.String serviceName)
A method to remove the specified service. |
void |
removeService(java.lang.String address,
int port)
A method to remove the specified service. |
void |
removeServiceParameter(java.net.SocketAddress address,
java.lang.String param)
A method to remove the specified service. |
void |
removeServiceParameter(java.lang.String address,
int port,
java.lang.String param)
A method to remove the specified service parameter. |
void |
removeServiceParameter(java.lang.String serviceName,
java.lang.String param)
A method to remove the specified service parameter. |
void |
setParameterInAllServices(java.lang.String param,
java.lang.String value)
Sets the specified parameter to the specified value in all services running on this system. |
void |
setServiceParameter(java.net.SocketAddress address,
java.lang.String param,
java.lang.String value)
A method to set the specified service parameter. |
void |
setServiceParameter(java.lang.String address,
int port,
java.lang.String param,
java.lang.String value)
A method to set the specified service parameter. |
void |
setServiceParameter(java.lang.String serviceName,
java.lang.String param,
java.lang.String value)
A method to set the specified service parameter. |
void |
shutdownNicely()
A method to shutdown the entire Internet Service Server as soon as all existing connections have ended. |
void |
shutdownNow()
A method to shutdown the entire Internet Service Server. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
---|
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
---|
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
---|
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Server(java.lang.String filename) throws java.lang.Exception
filename
- the path and filename to the XML data to construct this object from.
java.lang.Exception
- in the event an exception we can't handle is thrown.public Server(java.io.File file) throws java.lang.Exception
file
- the file object of the XML data to construct this object from.
java.lang.Exception
- in the event an exception we can't handle is thrown.Method Detail |
---|
public java.lang.String describeService(java.lang.String address, int port) throws java.rmi.RemoteException, java.net.UnknownHostException, ConnectionManagerNotFoundException
describeService
in interface ServerRemoteInterface
address
- the host name or IP address the service to describe is
bound to.port
- the port the service to describe is bound to.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
java.net.UnknownHostException
- if the specified hostname is unknown.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public java.lang.String describeService(java.lang.String serviceName) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
describeService
in interface ServerRemoteInterface
serviceName
- the service to be described.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public java.lang.String describeService(java.net.SocketAddress address) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
describeService
in interface ServerRemoteInterface
address
- the SocketAddress of the service to be described.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public java.lang.String describeServiceParameter(java.lang.String address, int port, java.lang.String param) throws java.rmi.RemoteException, java.net.UnknownHostException, ConnectionManagerNotFoundException
describeServiceParameter
in interface ServerRemoteInterface
address
- the host name or IP address the service to describe is
bound to.port
- the port the service to describe is bound to.param
- the name of the parameter to query.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
java.net.UnknownHostException
- if the specified hostname is unknown.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public java.lang.String describeServiceParameter(java.lang.String serviceName, java.lang.String param) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
describeServiceParameter
in interface ServerRemoteInterface
serviceName
- the name of the service to query.param
- the name of the parameter to query.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public java.lang.String describeServiceParameter(java.net.SocketAddress address, java.lang.String param) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
describeServiceParameter
in interface ServerRemoteInterface
address
- the SocketAddress the service to query is bound to.param
- the name of the parameter to query.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void denyIncomingRequests(java.net.SocketAddress address) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
denyIncomingRequests
in interface ServerRemoteInterface
address
- the SocketAddress the service to query is bound to.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void denyIncomingRequests(java.lang.String serviceName) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
denyIncomingRequests
in interface ServerRemoteInterface
serviceName
- the name of the service to query.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void acceptIncomingRequests(java.net.SocketAddress address) throws java.rmi.RemoteException, ConnectionManagerNotFoundException, ServiceAlreadyRunningException
acceptIncomingRequests
in interface ServerRemoteInterface
address
- the hostname or IP address of the service to process.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.
ServiceAlreadyRunningException
- if the specified service is
already running.
java.lang.RuntimeException
- exceptionpublic void acceptIncomingRequests(java.lang.String serviceName) throws java.rmi.RemoteException, ConnectionManagerNotFoundException, ServiceAlreadyRunningException
acceptIncomingRequests
in interface ServerRemoteInterface
serviceName
- the name of the service to process.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.
ServiceAlreadyRunningException
- if the specified service is
already running.
java.lang.RuntimeException
- exceptionpublic java.lang.String getStatus(java.net.SocketAddress address) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
getStatus
in interface ServerRemoteInterface
address
- the hostname or IP address of the service to process.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public java.lang.String getStatus(java.lang.String serviceName) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
getStatus
in interface ServerRemoteInterface
serviceName
- the name of the service to process.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void shutdownNow() throws java.rmi.RemoteException
shutdownNow
in interface ServerRemoteInterface
java.rmi.RemoteException
- if an RMI communication problem is
encountered.public void shutdownNicely() throws java.rmi.RemoteException
shutdownNicely
in interface ServerRemoteInterface
java.rmi.RemoteException
- if an RMI communication problem is
encountered.public void denyIncomingRequests(java.lang.String address, int port) throws java.rmi.RemoteException, java.net.UnknownHostException, ConnectionManagerNotFoundException
denyIncomingRequests
in interface ServerRemoteInterface
address
- the hostname or IP address of the service to process.port
- the port the service to describe is bound to.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
java.net.UnknownHostException
- if the specified hostname is unknown.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void acceptIncomingRequests(java.lang.String address, int port) throws java.rmi.RemoteException, java.net.UnknownHostException, ConnectionManagerNotFoundException, ServiceAlreadyRunningException
acceptIncomingRequests
in interface ServerRemoteInterface
address
- the hostname or IP address of the service to process.port
- the port the service to describe is bound to.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
java.net.UnknownHostException
- if the specified hostname is unknown.
ConnectionManagerNotFoundException
- if the requested service
can't be found.
ServiceAlreadyRunningException
- if the specified service is
already running.public java.lang.String getStatus(java.lang.String address, int port) throws java.rmi.RemoteException, java.net.UnknownHostException, ConnectionManagerNotFoundException
getStatus
in interface ServerRemoteInterface
address
- the name of the service to process.port
- the port the service to describe is bound to.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
java.net.UnknownHostException
- if the specified hostname is unknown.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void setServiceParameter(java.lang.String address, int port, java.lang.String param, java.lang.String value) throws java.rmi.RemoteException, java.net.UnknownHostException, ConnectionManagerNotFoundException
setServiceParameter
in interface ServerRemoteInterface
address
- the host name or IP address the service to describe is
bound to.port
- the port the service to describe is bound to.param
- the name of the parameter to query.value
- the value to set the parameter to.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
java.net.UnknownHostException
- if the specified hostname is unknown.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void setServiceParameter(java.lang.String serviceName, java.lang.String param, java.lang.String value) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
setServiceParameter
in interface ServerRemoteInterface
serviceName
- the name of the service to query.param
- the name of the parameter to query.value
- the value to set the parameter to.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void setServiceParameter(java.net.SocketAddress address, java.lang.String param, java.lang.String value) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
setServiceParameter
in interface ServerRemoteInterface
address
- the SocketAddress the service to query is bound to.param
- the name of the parameter to query.value
- the value to set the parameter to.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void createService(java.lang.String name, java.lang.String address, int port, java.lang.String adapterName) throws java.rmi.RemoteException, java.lang.ClassNotFoundException, java.net.UnknownHostException
createService
in interface ServerRemoteInterface
name
- the name to assign to the service.address
- the IP address to bind to.port
- the port to listen to.adapterName
- the classname of the adapter to use.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
java.lang.ClassNotFoundException
- if the specified adapter cannot be
found.
java.net.UnknownHostException
- exceptionpublic void createService(java.lang.String name, java.net.SocketAddress address, java.lang.String adapterName) throws java.rmi.RemoteException, java.lang.ClassNotFoundException
createService
in interface ServerRemoteInterface
name
- the name to assign to the service.address
- the SocketAddress object to bind to.adapterName
- the classname of the adapter to use.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
java.lang.ClassNotFoundException
- if the specified adapter cannot be
found.public java.lang.String describeAllServices() throws java.rmi.RemoteException
describeAllServices
in interface ServerRemoteInterface
java.rmi.RemoteException
- if an RMI communication problem is
encountered.public java.lang.String getAllStatus() throws java.rmi.RemoteException
getAllStatus
in interface ServerRemoteInterface
java.rmi.RemoteException
- if an RMI communication problem is
encountered.public java.lang.String describeAllServicesWithParameter(java.lang.String param) throws java.rmi.RemoteException
describeAllServicesWithParameter
in interface ServerRemoteInterface
param
- the name of the parameter to describe.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.public void setParameterInAllServices(java.lang.String param, java.lang.String value) throws java.rmi.RemoteException
setParameterInAllServices
in interface ServerRemoteInterface
param
- the name of the parameter to be set.value
- the value to set the parameter to.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.public void denyAllIncomingRequests() throws java.rmi.RemoteException
denyAllIncomingRequests
in interface ServerRemoteInterface
java.rmi.RemoteException
- if an RMI communication problem is
encountered.public void acceptAllIncomingRequests() throws java.rmi.RemoteException
acceptAllIncomingRequests
in interface ServerRemoteInterface
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
java.lang.RuntimeException
- exceptionpublic void removeService(java.lang.String address, int port) throws java.rmi.RemoteException, java.net.UnknownHostException, ConnectionManagerNotFoundException
removeService
in interface ServerRemoteInterface
address
- the host name or IP address the service to remove is bound
to.port
- the port the service to remove is bound to.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
java.net.UnknownHostException
- if the specified hostname is unknown.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void removeService(java.lang.String serviceName) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
removeService
in interface ServerRemoteInterface
serviceName
- the service to be removed.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void removeService(java.net.SocketAddress address) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
removeService
in interface ServerRemoteInterface
address
- the SocketAddress of the service to be removed.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void removeServiceParameter(java.lang.String address, int port, java.lang.String param) throws java.rmi.RemoteException, java.net.UnknownHostException, ConnectionManagerNotFoundException
removeServiceParameter
in interface ServerRemoteInterface
address
- the host name or IP address the service to remove the
parameter from is bound to.port
- the port the service to remove is bound to.param
- parameter value
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
java.net.UnknownHostException
- if the specified hostname is unknown.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void removeServiceParameter(java.lang.String serviceName, java.lang.String param) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
removeServiceParameter
in interface ServerRemoteInterface
serviceName
- the service to remove the parameter from.param
- parameter value
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void removeServiceParameter(java.net.SocketAddress address, java.lang.String param) throws java.rmi.RemoteException, ConnectionManagerNotFoundException
removeServiceParameter
in interface ServerRemoteInterface
address
- the SocketAddress of the service to remove the parameter
from.param
- parameter value
java.rmi.RemoteException
- if an RMI communication problem is
encountered.
ConnectionManagerNotFoundException
- if the requested service
can't be found.public void removeAllServices() throws java.rmi.RemoteException
removeAllServices
in interface ServerRemoteInterface
java.rmi.RemoteException
- if an RMI communication problem is
encountered.public void removeParameterInAllServices(java.lang.String param) throws java.rmi.RemoteException
removeParameterInAllServices
in interface ServerRemoteInterface
param
- the parameter to be removed from all services.
java.rmi.RemoteException
- if an RMI communication problem is
encountered.public static void main(java.lang.String[] args)
args
- the command-line arguments as passed by the JRE.
|
jSyncManager Simple Java Server | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |