org.apache.activeio.xnet
Class ServiceDaemon

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

public class ServiceDaemon
extends java.lang.Object
implements ServerService


Constructor Summary
ServiceDaemon(SocketService socketService, java.net.InetAddress address, int port)
           
ServiceDaemon(java.lang.String name, SocketService socketService, java.net.InetAddress address, int port)
           
 
Method Summary
 java.net.InetAddress getAddress()
          Gets the inetAddress number that the daemon is listening on.
 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.
 java.lang.String getServiceName()
           
 int getSoTimeout()
           
 void init(java.util.Properties props)
           
 void service(java.net.Socket socket)
           
 void setSoTimeout(int timeout)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceDaemon

public ServiceDaemon(SocketService socketService,
                     java.net.InetAddress address,
                     int port)

ServiceDaemon

public ServiceDaemon(java.lang.String name,
                     SocketService socketService,
                     java.net.InetAddress address,
                     int port)
Method Detail

setSoTimeout

public void setSoTimeout(int timeout)
                  throws java.net.SocketException
Throws:
java.net.SocketException

getSoTimeout

public int getSoTimeout()
                 throws java.io.IOException
Throws:
java.io.IOException

getServiceName

public java.lang.String getServiceName()

getAddress

public java.net.InetAddress getAddress()
Gets the inetAddress number that the daemon is listening on.


init

public void init(java.util.Properties props)
          throws java.lang.Exception
Specified by:
init in interface ServerService
Throws:
java.lang.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

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 interface ServerService

getPort

public int getPort()
Gets the port number that the daemon is listening on.

Specified by:
getPort in interface ServerService

service

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

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 interface SocketService


Copyright © 2005-2011. All Rights Reserved.