Service

Classes implementing this interface usually provide a TCP/IP listener such as an FTP server. The can be started and stopped, and may or may not allow remote connections.

Methods
boolean getAllowOthers()
Check if remote connections are allowed.
boolean getAllowOthers()
Check if remote connections are allowed.
Returns:
true if remote connections are allowed
String getName()
Get the human readable name of the service.
String getName()
Get the human readable name of the service.
Returns:
the name
int getPort()
Gets the port this service is listening on.
int getPort()
Gets the port this service is listening on.
Returns:
the port
String getType()
Get the human readable short name of the service.
String getType()
Get the human readable short name of the service.
Returns:
the type
String getURL()
Get the URL of this service in a human readable form
String getURL()
Get the URL of this service in a human readable form
Returns:
the url
void init(String... args)
Initialize the service from command line options.
void init(String... args) throws Exception
Initialize the service from command line options.
Parameters:
args - the command line options
boolean isDaemon()
Check if a daemon thread should be used.
boolean isDaemon()
Check if a daemon thread should be used.
Returns:
true if a daemon thread should be used
boolean isRunning(boolean traceError)
Check if the service is running.
boolean isRunning(boolean traceError)
Check if the service is running.
Parameters:
traceError - if errors should be written
Returns:
if the server is running
void listen()
Listen for incoming connections.
void listen()
Listen for incoming connections. This method blocks.
void start()
Start the service.
void start() throws SQLException
Start the service. This usually means create the server socket. This method must not block.
void stop()
Stop the service.
void stop()
Stop the service.