org.szegedi.nioserver
Class Service

java.lang.Object
  |
  +--org.szegedi.nioserver.Service

public class Service
extends java.lang.Object

The Service class represents each service that was registered with a NioServer. Basically, once you have registered a service with a server, you can do pretty little with it - this class allows you to retrieve the socket address, and to stop the service.

Version:
$Id: Service.java,v 1.2 2002/02/11 08:18:30 szegedia Exp $
Author:
Attila Szegedi, szegedia at freemail dot hu

Method Summary
 java.net.SocketAddress getSocketAddress()
          Returns the socket address used by this service.
 void stop()
          Stops the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSocketAddress

public java.net.SocketAddress getSocketAddress()
Returns the socket address used by this service. This method is especially useful when you have to connect to the service from the local VM, and need to know the exact port if the service was created passing 0 (that is "any free port will do") for the port number.


stop

public void stop()
Stops the service. The service will not accept any new connections, however existing connections will continue to be serviced.