org.apache.directory.server.protocol.shared
Interface ProtocolService

All Known Implementing Classes:
AbstractProtocolService, DirectoryBackedService

public interface ProtocolService

Minimum functionality required by an ApacheDS protocol service.

Author:
Apache Directory Project

Method Summary
 org.apache.mina.transport.socket.DatagramAcceptor getDatagramAcceptor(Transport transport)
          If this protocol service supports UDP transport then this gets the non-null MINA DatagramAcceptor it uses.
 String getServiceId()
          Gets the instance identifier for this ProtocolService.
 String getServiceName()
          Gets a descriptive name for the kind of service this represents.
 org.apache.mina.transport.socket.SocketAcceptor getSocketAcceptor(Transport transport)
          If this protocol service support TCP transport then this gets the MINA SocketAcceptor it uses.
 boolean isEnabled()
          Services can be enabled or disabled.
 boolean isStarted()
          Gets whether or not this service has been started.
 void setEnabled(boolean enabled)
          Sets whether or not this ProtocolService is enabled.
 void setServiceId(String serviceId)
          Sets the instance identifier for this ProtocolService.
 void setServiceName(String name)
          Sets the descriptive name for the kind of service this represents.
 void start()
          Starts this ProtocolService which binds acceptors on the protocol port.
 void stop()
          Stops this ProtocolService which unbinds acceptors on the protocol port.
 

Method Detail

stop

void stop()
          throws Exception
Stops this ProtocolService which unbinds acceptors on the protocol port.

Throws:
Exception - if there are problems stopping this service

start

void start()
           throws Exception
Starts this ProtocolService which binds acceptors on the protocol port.

Throws:
Exception - if there are problems starting this service

isStarted

boolean isStarted()
Gets whether or not this service has been started.

Returns:
true if the service has started, false otherwise

getDatagramAcceptor

org.apache.mina.transport.socket.DatagramAcceptor getDatagramAcceptor(Transport transport)
If this protocol service supports UDP transport then this gets the non-null MINA DatagramAcceptor it uses.

Returns:
the MINA DatagramAcceptor used for UDP transports

getSocketAcceptor

org.apache.mina.transport.socket.SocketAcceptor getSocketAcceptor(Transport transport)
If this protocol service support TCP transport then this gets the MINA SocketAcceptor it uses.

Returns:
the MINA SocketAcceptor used for TCP transport

isEnabled

boolean isEnabled()
Services can be enabled or disabled. If enabled they will be started, if not they will not.

Returns:
true if this service is to be started, false otherwise

setEnabled

void setEnabled(boolean enabled)
Sets whether or not this ProtocolService is enabled.

Parameters:
enabled - true to enable, false to disable

getServiceId

String getServiceId()
Gets the instance identifier for this ProtocolService.

Returns:
the identifier for the service instance

setServiceId

void setServiceId(String serviceId)
Sets the instance identifier for this ProtocolService.

Parameters:
serviceId - an identifier for the service instance

getServiceName

String getServiceName()
Gets a descriptive name for the kind of service this represents. This name is constant across instances of this ProtocolService.

Returns:
a descriptive name for the kind of this service

setServiceName

void setServiceName(String name)
Sets the descriptive name for the kind of service this represents. This name is constant across instances of this ProtocolService.

Parameters:
name - a descriptive name for the kind of this service


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.