public class ServiceLogger extends Object implements ServerService
| Constructor and Description |
|---|
ServiceLogger(String name,
ServerService next,
String[] logOnSuccess,
String[] logOnFailure) |
| Modifier and Type | Method and Description |
|---|---|
String |
getIP()
Gets the ip number that the
daemon is listening on.
|
String[] |
getLogOnFailure() |
String[] |
getLogOnSuccess() |
String |
getName()
Gets the name of the service.
|
int |
getPort()
Gets the port number that the
daemon is listening on.
|
void |
init(Properties props) |
void |
service(Socket socket)
log_on_success
-----------------
Different information can be logged when a server starts:
PID : the server's PID (if it's an internal xinetd service, the PID has then a value of 0) ;
HOST : the client address ;
USERID : the identity of the remote user, according to RFC1413 defining identification protocol;
EXIT : the process exit status;
DURATION : the session duration.
|
void |
start() |
void |
stop() |
public ServiceLogger(String name, ServerService next, String[] logOnSuccess, String[] logOnFailure)
public void service(Socket socket) throws ServiceException, IOException
service in interface SocketServicesocket - ServiceExceptionIOExceptionpublic String[] getLogOnSuccess()
public String[] getLogOnFailure()
public void init(Properties props) throws Exception
init in interface ServerServiceExceptionpublic void start()
throws ServiceException
start in interface ServerServiceServiceExceptionpublic void stop()
throws ServiceException
stop in interface ServerServiceServiceExceptionpublic String getName()
SocketServicegetName in interface SocketServicepublic String getIP()
ServerServicegetIP in interface ServerServicepublic int getPort()
ServerServicegetPort in interface ServerServiceCopyright © 2005–2019. All rights reserved.