org.apache.activeio.xnet.hba
Class ServiceAccessController

java.lang.Object
  extended by org.apache.activeio.xnet.hba.ServiceAccessController
All Implemented Interfaces:
ServerService, SocketService

public class ServiceAccessController
extends Object
implements ServerService


Constructor Summary
ServiceAccessController(ServerService next)
           
ServiceAccessController(String name, ServerService next, IPAddressPermission[] ipAddressMasks)
           
 
Method Summary
 void checkHostsAuthorization(InetAddress clientAddress, InetAddress serverAddress)
           
 IPAddressPermission[] getAllowHosts()
           
 String getIP()
          Gets the ip number that the daemon is listening on.
 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)
           
 void setAllowHosts(IPAddressPermission[] ipAddressMasks)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceAccessController

public ServiceAccessController(ServerService next)

ServiceAccessController

public ServiceAccessController(String name,
                               ServerService next,
                               IPAddressPermission[] ipAddressMasks)
Method Detail

service

public void service(Socket socket)
             throws ServiceException,
                    IOException
Specified by:
service in interface SocketService
Throws:
ServiceException
IOException

getAllowHosts

public IPAddressPermission[] getAllowHosts()

setAllowHosts

public void setAllowHosts(IPAddressPermission[] ipAddressMasks)

checkHostsAuthorization

public void checkHostsAuthorization(InetAddress clientAddress,
                                    InetAddress serverAddress)
                             throws SecurityException
Throws:
SecurityException

init

public void init(Properties props)
          throws Exception
Specified by:
init in interface ServerService
Throws:
Exception

start

public void start()
           throws ServiceException
Specified by:
start in interface ServerService
Throws:
ServiceException

stop

public void stop()
          throws ServiceException
Specified by:
stop in interface ServerService
Throws:
ServiceException

getName

public String getName()
Description copied from interface: SocketService
Gets the name of the service. Used for display purposes only

Specified by:
getName in interface SocketService

getIP

public String getIP()
Description copied from interface: ServerService
Gets the ip number that the daemon is listening on.

Specified by:
getIP in interface ServerService

getPort

public int getPort()
Description copied from interface: ServerService
Gets the port number that the daemon is listening on.

Specified by:
getPort in interface ServerService


Copyright © 2005-2014 The Apache Software Foundation. All Rights Reserved.