org.elkoserver.foundation.actor
Interface BasicProtocolActor

All Superinterfaces:
Deliverer
All Known Implementing Classes:
InternalActor, WorkshopActor

public interface BasicProtocolActor
extends Deliverer

Interface to be implemented by actor classes making use of the BasicProtocolHandler message handler implementation, or handlers derived from it. The BasicProtocolHandler requires the methods defined in this interface to be available to it as callbacks on the Actor for whom it is providing services.


Method Summary
 boolean doAuth(BasicProtocolHandler handler, AuthDesc auth, String label)
          Authorize (or refuse authorization for) a connection for this actor.
 void doDisconnect()
          Disconnect this actor.
 
Methods inherited from interface org.elkoserver.foundation.json.Deliverer
send
 

Method Detail

doAuth

boolean doAuth(BasicProtocolHandler handler,
               AuthDesc auth,
               String label)
Authorize (or refuse authorization for) a connection for this actor.

Parameters:
handler - Handler requesting the authorization.
auth - Authorization information from the authorization request message, or null if no authorization information was provided.
label - Label (e.g., displayable user name) string from the authorization request message, or "<anonymous>" if no value was specified.
Returns:
true if the authorization succeeded and the session should be allowed to proceed, false if it did not and the session should be disconnected.

doDisconnect

void doDisconnect()
Disconnect this actor.