Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Class AuthorizationRequest

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.AuthorizationRequest

public class AuthorizationRequest
extends Object

This class is used to represent both incoming and outgoing AuthorizationRequests-s

An outgoing Authorization Request is to be created by the user interface when an authorization error/challenge has been received by the underlying protocol. The user interface or any other bundle responsible of handling such requests is to implement the AuthoizationHandler interface and register itself as an authorization handler of a protocol provider. Whenever a request needs to be sent the protocol provider would ask the the AuthorizationHandler to create one through the createAuthorizationRequest() method.

Incoming Authorization requests are delivered to the ProtocolProviderService implementation through the AuthorizationHandler.processAuthorizationRequest() method.

Author:
Emil Ivov

Constructor Summary
AuthorizationRequest()
          Creates an empty authorization request with no reason or any other properties.
 
Method Summary
 String getReason()
          Returns the reason that should be sent to the remote user when asking for authorization.
 void setReason(String reason)
          Sets the reason phrase that should be sent to the user we're demanding for authorization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorizationRequest

public AuthorizationRequest()
Creates an empty authorization request with no reason or any other properties.

Method Detail

setReason

public void setReason(String reason)
Sets the reason phrase that should be sent to the user we're demanding for authorization.

Parameters:
reason - a human readable text to be set by the user.

getReason

public String getReason()
Returns the reason that should be sent to the remote user when asking for authorization.

Returns:
a String containing a reason phrase that should be sent to the remote user when asking them for authorization.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.