Package org.apache.activeio.xnet
Class ServicePool
- java.lang.Object
-
- org.apache.activeio.xnet.ServicePool
-
- All Implemented Interfaces:
ServerService
,SocketService
public class ServicePool extends java.lang.Object implements ServerService
-
-
Constructor Summary
Constructors Constructor Description ServicePool(ServerService next, java.lang.String name, int threads, long keepAliveTime)
ServicePool(ServerService next, java.util.concurrent.Executor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getIP()
Gets the ip number that the daemon is listening on.java.lang.String
getName()
Gets the name of the service.int
getPort()
Gets the port number that the daemon is listening on.void
init(java.util.Properties props)
Pulls out the access log informationvoid
service(java.net.Socket socket)
void
start()
void
stop()
-
-
-
Constructor Detail
-
ServicePool
public ServicePool(ServerService next, java.lang.String name, int threads, long keepAliveTime)
-
ServicePool
public ServicePool(ServerService next, java.util.concurrent.Executor executor)
-
-
Method Detail
-
service
public void service(java.net.Socket socket) throws ServiceException, java.io.IOException
- Specified by:
service
in interfaceSocketService
- Throws:
ServiceException
java.io.IOException
-
init
public void init(java.util.Properties props) throws java.lang.Exception
Pulls out the access log information- Specified by:
init
in interfaceServerService
- Parameters:
props
-- Throws:
ServiceException
java.lang.Exception
-
start
public void start() throws ServiceException
- Specified by:
start
in interfaceServerService
- Throws:
ServiceException
-
stop
public void stop() throws ServiceException
- Specified by:
stop
in interfaceServerService
- Throws:
ServiceException
-
getName
public java.lang.String getName()
Gets the name of the service. Used for display purposes only- Specified by:
getName
in interfaceSocketService
-
getIP
public java.lang.String getIP()
Gets the ip number that the daemon is listening on.- Specified by:
getIP
in interfaceServerService
-
getPort
public int getPort()
Gets the port number that the daemon is listening on.- Specified by:
getPort
in interfaceServerService
-
-