Package org.apache.activeio.xnet.hba
Class ServiceAccessController
- java.lang.Object
-
- org.apache.activeio.xnet.hba.ServiceAccessController
-
- All Implemented Interfaces:
ServerService
,SocketService
public class ServiceAccessController extends java.lang.Object implements ServerService
-
-
Constructor Summary
Constructors Constructor Description ServiceAccessController(java.lang.String name, ServerService next, IPAddressPermission[] ipAddressMasks)
ServiceAccessController(ServerService next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkHostsAuthorization(java.net.InetAddress clientAddress, java.net.InetAddress serverAddress)
IPAddressPermission[]
getAllowHosts()
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)
void
service(java.net.Socket socket)
void
setAllowHosts(IPAddressPermission[] ipAddressMasks)
void
start()
void
stop()
-
-
-
Constructor Detail
-
ServiceAccessController
public ServiceAccessController(ServerService next)
-
ServiceAccessController
public ServiceAccessController(java.lang.String name, ServerService next, IPAddressPermission[] ipAddressMasks)
-
-
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
-
getAllowHosts
public IPAddressPermission[] getAllowHosts()
-
setAllowHosts
public void setAllowHosts(IPAddressPermission[] ipAddressMasks)
-
checkHostsAuthorization
public void checkHostsAuthorization(java.net.InetAddress clientAddress, java.net.InetAddress serverAddress) throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
-
init
public void init(java.util.Properties props) throws java.lang.Exception
- Specified by:
init
in interfaceServerService
- Throws:
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()
Description copied from interface:SocketService
Gets the name of the service. Used for display purposes only- Specified by:
getName
in interfaceSocketService
-
getIP
public java.lang.String getIP()
Description copied from interface:ServerService
Gets the ip number that the daemon is listening on.- Specified by:
getIP
in interfaceServerService
-
getPort
public int getPort()
Description copied from interface:ServerService
Gets the port number that the daemon is listening on.- Specified by:
getPort
in interfaceServerService
-
-