Package org.apache.activeio.xnet
Class ServiceLogger
java.lang.Object
org.apache.activeio.xnet.ServiceLogger
- All Implemented Interfaces:
ServerService,SocketService
-
Constructor Summary
ConstructorsConstructorDescriptionServiceLogger(String name, ServerService next, String[] logOnSuccess, String[] logOnFailure) -
Method Summary
Modifier and TypeMethodDescriptiongetIP()Gets the ip number that the daemon is listening on.String[]String[]getName()Gets the name of the service.intgetPort()Gets the port number that the daemon is listening on.voidinit(Properties props) voidlog_on_success ----------------- Different information can be logged when a server starts:voidstart()voidstop()
-
Constructor Details
-
ServiceLogger
-
-
Method Details
-
service
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. log_on_failure ------------------ Here again, xinetd can log a lot of information when a server can't start, either by lack of resources or because of access rules: HOST, USERID : like above mentioned ; ATTEMPT : logs an access attempt. This an automatic option as soon as another value is provided; RECORD : logs every information available on the client.- Specified by:
servicein interfaceSocketService- Parameters:
socket-- Throws:
ServiceExceptionIOException
-
getLogOnSuccess
-
getLogOnFailure
-
init
- Specified by:
initin interfaceServerService- Throws:
Exception
-
start
- Specified by:
startin interfaceServerService- Throws:
ServiceException
-
stop
- Specified by:
stopin interfaceServerService- Throws:
ServiceException
-
getName
Description copied from interface:SocketServiceGets the name of the service. Used for display purposes only- Specified by:
getNamein interfaceSocketService
-
getIP
Description copied from interface:ServerServiceGets the ip number that the daemon is listening on.- Specified by:
getIPin interfaceServerService
-
getPort
public int getPort()Description copied from interface:ServerServiceGets the port number that the daemon is listening on.- Specified by:
getPortin interfaceServerService
-