org.apache.mina.registry
Interface ServiceRegistry

All Known Implementing Classes:
SimpleServiceRegistry

public interface ServiceRegistry

Interface for the internet service registry. The registry is used by MINA to associate services with ports and transport protocols.

Version:
$Rev: 326586 $, $Date: 2005-10-19 17:50:29 +0200 (Wed, 19 Oct 2005) $
Author:
The Apache Directory Project (dev@directory.apache.org)

Method Summary
 void bind(Service service, IoHandler ioHandler)
          Binds the specified I/O handler to the specified service.
 void bind(Service service, ProtocolProvider protocolProvider)
          Binds the specified protocol provider to the specified service.
 java.util.Set getAllServices()
          Returns Set of all services bound in this registry.
 IoAcceptor getIoAcceptor(TransportType transportType)
           
 ProtocolAcceptor getProtocolAcceptor(TransportType transportType)
           
 java.util.Set getServices(int port)
          Returns Set of services bound in this registry with the specified port number.
 java.util.Set getServices(java.lang.String name)
          Returns Set of services bound in this registry with the specified service(or protocol) name.
 java.util.Set getServices(TransportType transportType)
          Returns Set of services bound in this registry with the specified transport type.
 void unbind(Service service)
          Unbinds the specified service (and its aggregated I/O handler or protocol provider).
 void unbindAll()
          Unbinds all services (and their aggregated I/O handlers or protocol providers).
 

Method Detail

bind

public void bind(Service service,
                 IoHandler ioHandler)
          throws java.io.IOException
Binds the specified I/O handler to the specified service.

Throws:
java.io.IOException

bind

public void bind(Service service,
                 ProtocolProvider protocolProvider)
          throws java.io.IOException
Binds the specified protocol provider to the specified service.

Throws:
java.io.IOException

unbind

public void unbind(Service service)
Unbinds the specified service (and its aggregated I/O handler or protocol provider).


unbindAll

public void unbindAll()
Unbinds all services (and their aggregated I/O handlers or protocol providers).


getAllServices

public java.util.Set getAllServices()
Returns Set of all services bound in this registry.


getServices

public java.util.Set getServices(java.lang.String name)
Returns Set of services bound in this registry with the specified service(or protocol) name.


getServices

public java.util.Set getServices(TransportType transportType)
Returns Set of services bound in this registry with the specified transport type.


getServices

public java.util.Set getServices(int port)
Returns Set of services bound in this registry with the specified port number.


getIoAcceptor

public IoAcceptor getIoAcceptor(TransportType transportType)

getProtocolAcceptor

public ProtocolAcceptor getProtocolAcceptor(TransportType transportType)