edu.ou.kmi.buddyspace.core
Class BSAuthorizationBean

java.lang.Object
  |
  +--edu.ou.kmi.buddyspace.core.BSAuthorizationBean

public class BSAuthorizationBean
extends java.lang.Object

BSAuthorizationBean provides athentication handling. It relies on BSInfoQueryBean, which must be set after each reconnection.


Method Summary
 void addAuthListener(BSAuthListener listener)
          Adds BSAuthListener to listeners notified when authentication state changes.
protected  void authorize(java.lang.String user, java.lang.String password, java.lang.String resource)
          Invokes authentication of given user.
protected  IQBean getIQBean()
          Returns currently used IQBean.
protected  void prepareToDestroy()
          Frees all object bindings to allow object destroy
 void receivedPacket(PacketEvent pe)
          Invoked when a IQ packet is received.
 void removeAllAuthListeners()
          Removes all listeners notified when authentication state changes.
 void removeAuthListener(BSAuthListener listener)
          Removes BSAuthListener to listeners notified when authentication state changes.
 void sendFailed(PacketEvent pe)
          Invoked when a IQ packet send failes.
protected  void sendPassword(IQAuth resultExt, java.lang.String user, java.lang.String password, java.lang.String resource)
          Sends user information including password - appropriate password coding is used according to given IQAuth extenion.
protected  void sendPassword(java.lang.String user, java.lang.String password, java.lang.String resource)
          This is now depricated - use the other one instead.
 void sentPacket(PacketEvent pe)
          Invoked when a IQ packet is sent.
protected  void setIQBean(IQBean iqBean)
          Sets existing and connected IQBean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setIQBean

protected void setIQBean(IQBean iqBean)
Sets existing and connected IQBean. Then this is registered as listener for IQ packets.


getIQBean

protected IQBean getIQBean()
Returns currently used IQBean.


prepareToDestroy

protected void prepareToDestroy()
Frees all object bindings to allow object destroy


authorize

protected void authorize(java.lang.String user,
                         java.lang.String password,
                         java.lang.String resource)
Invokes authentication of given user.


sendPassword

protected void sendPassword(java.lang.String user,
                            java.lang.String password,
                            java.lang.String resource)
This is now depricated - use the other one instead. Sends user information including password. This way the first phase when asking for required data is omitted and data is sent directly.


sendPassword

protected void sendPassword(IQAuth resultExt,
                            java.lang.String user,
                            java.lang.String password,
                            java.lang.String resource)
Sends user information including password - appropriate password coding is used according to given IQAuth extenion.


receivedPacket

public void receivedPacket(PacketEvent pe)
Invoked when a IQ packet is received.


sendFailed

public void sendFailed(PacketEvent pe)
Invoked when a IQ packet send failes.


sentPacket

public void sentPacket(PacketEvent pe)
Invoked when a IQ packet is sent.


addAuthListener

public void addAuthListener(BSAuthListener listener)
Adds BSAuthListener to listeners notified when authentication state changes.

See Also:
removeAuthListener(edu.ou.kmi.buddyspace.core.BSAuthListener), removeAllAuthListeners(), #notifyAuthListeners

removeAuthListener

public void removeAuthListener(BSAuthListener listener)
Removes BSAuthListener to listeners notified when authentication state changes.

See Also:
addAuthListener(edu.ou.kmi.buddyspace.core.BSAuthListener), removeAllAuthListeners(), #notifyAuthListeners

removeAllAuthListeners

public void removeAllAuthListeners()
Removes all listeners notified when authentication state changes. This can be used before to free dependencies and allow dispose of all objects.

See Also:
addAuthListener(edu.ou.kmi.buddyspace.core.BSAuthListener), removeAuthListener(edu.ou.kmi.buddyspace.core.BSAuthListener), #notifyAuthListeners