org.openuat.util
Interface HostAuthenticationServer

All Known Implementing Classes:
BluetoothOpportunisticConnector, BluetoothRFCOMMServer, HostServerBase, TCPPortServer

public interface HostAuthenticationServer

This interface represents the minimum requirement for server parts that can listen to incoming authentication requests. It abstracts from the underlying channel.

Version:
1.0
Author:
Rene Mayrhofer

Method Summary
 void addAuthenticationProgressHandler(AuthenticationProgressHandler handler)
          Registers an event handler for listening to incoming authentication protocol events.
 void addProtocolCommandHandler(java.lang.String command, ProtocolCommandHandler handler)
          Adds a protocol command handler.
 boolean removeAuthenticationProgressHandler(AuthenticationProgressHandler handler)
          Removes an event handler from listening to incoming authentication protocol events.
 boolean removeProtocolCommandHandler(java.lang.String command)
          Removes a protocol command handler.
 void start()
          Starts the server part.
 void stop()
          Stops the server part.
 

Method Detail

start

void start()
           throws java.io.IOException
Starts the server part. This must be idempotent, i.e. not start a second instance if it is already running.

Throws:
java.io.IOException

stop

void stop()
          throws InternalApplicationException
Stops the server part.

Throws:
InternalApplicationException

addAuthenticationProgressHandler

void addAuthenticationProgressHandler(AuthenticationProgressHandler handler)
Registers an event handler for listening to incoming authentication protocol events.

Parameters:
handler - The handler to register.

removeAuthenticationProgressHandler

boolean removeAuthenticationProgressHandler(AuthenticationProgressHandler handler)
Removes an event handler from listening to incoming authentication protocol events.

Parameters:
handler - The handler to remove.
Returns:
true if the handler was removed, false otherwise (if this handler object was not registered).

addProtocolCommandHandler

void addProtocolCommandHandler(java.lang.String command,
                               ProtocolCommandHandler handler)
Adds a protocol command handler.

Parameters:
command - The command to react to.
handler - The handler that will be called to handle the protocol session when it is started with command.

removeProtocolCommandHandler

boolean removeProtocolCommandHandler(java.lang.String command)
Removes a protocol command handler.

Parameters:
command - The command to stop reacting to.
Returns:
true if the command handler was removed, false otherwise (if no handler was previously registered for this command).


2005-2009, Rene Mayrhofer.