public interface AuthorizationHandler
The AuthorizationHandler is to be implmented by the User Interface as all its methods would require user intervention.
Note that some protocols do not support authorizations or allow them to be turned off. In such cases the methods from this interface will never be called.
Modifier and Type | Method and Description |
---|---|
AuthorizationRequest |
createAuthorizationRequest(Contact contact)
Called by the protocol provider, this method should be implemented by the
user interface.
|
AuthorizationResponse |
processAuthorisationRequest(AuthorizationRequest req,
Contact sourceContact)
Called by the protocol provider whenever someone would like to add us to
their contact list.
|
void |
processAuthorizationResponse(AuthorizationResponse response,
Contact sourceContact)
Called by the protocol provider, this method should be implemented by the
user interface.
|
AuthorizationResponse processAuthorisationRequest(AuthorizationRequest req, Contact sourceContact)
The returned AuthorizationResponse object is to be created by the implementation of this interface, and it should contain a reason phrase (especially in the case of a negative response) that will be sent to the remote user.
Note that some protocols do not support authorizations or allow them to be turned off. In such cases the method will never be called.
req
- the authorization request that we should act upon.sourceContact
- a reference to the Contact demanding authorizationAuthorizationRequest createAuthorizationRequest(Contact contact)
Note that some protocols do not support authorizations or allow them to be turned off. In such cases the method will never be called.
contact
- the Contact whose authorization we'll be
requesting.void processAuthorizationResponse(AuthorizationResponse response, Contact sourceContact)
response
- the AuthorizationResponse that we have received.sourceContact
- a reference to the Contact demanding authorization
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.