org.mobicents.slee.resource.parlay.fw.access
Class TSMBeanImpl

java.lang.Object
  extended by org.mobicents.slee.resource.parlay.fw.access.TSMBeanImpl
All Implemented Interfaces:
java.io.Serializable, TSMBean, TSMBeanConstants

public class TSMBeanImpl
extends java.lang.Object
implements java.io.Serializable, TSMBeanConstants, TSMBean

This class represents the trust and security management Framework services.
It is used by clients to perform its part of the mutual authentication process with the Framework necessary to be allowed to use any of the other interfaces supported by the Framework. It can then be used to access the other interfaces. This is a higher level bean which encompasses all of the interfaces within the Parlay trust_and_security module.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.mobicents.slee.resource.parlay.fw.access.TSMBeanConstants
ACCESS_TYPE, ACTIVE_STATE, AUTHENTICATION_TYPE, IDLE_STATE, INITIALIZED_STATE, INVALID_STATE, NULL_AUTH, P_DISCOVERY, P_RSA_1024, P_RSA_512, P_SERVICE_AGREEMENT_MANAGEMENT
 
Constructor Summary
TSMBeanImpl(FwSession fwSession, FwSessionProperties fwProperties)
           
 
Method Summary
 void addTSMBeanListener(TSMBeanListener l)
          Adds an application listener to the list of those registered on this bean.
 void authenticate()
          This method will authenticate a client with the Parlay framework.
 void cleanup()
          This method will clean up all internal object references with the exception of registered listeners which are the responsibility of the application.
 SABean createSABean()
          This method will create an instance of the Servcie Agreement bean.
 void destroySABean()
          This method will release an instance of the Service Agreement bean.
 void endAccess(org.csapi.fw.TpProperty[] endAccessProperties)
          This nethod will end a client's access session with the Parlay framework.
 void fireTerminateAccess(org.mobicents.csapi.jr.slee.fw.TerminateAccessEvent e)
          Method fireTerminateAccess.
 byte[] generateDigitalSignature(java.lang.String text)
          used to generate a digital signature using the termination text
 java.lang.Object getAuthenticationMonitor()
          Returns an object that can be used as a monitor for authentication.
 java.lang.String getClientDomain(org.csapi.fw.TpDomainID clientDomainID)
          Retrieves the client domain ID to be used for checking the HA database.
 org.csapi.fw.TpDomainID getClientDomainID()
          Returns the client domain ID to be used for authentication.
 java.lang.String getClientID()
          Returns the client ID (without type) to be used for authentication.
 java.lang.String getEncryptionMethod()
          Returns the encryption method chosen by the framework during the authentication sequence.
 EDU.oswego.cs.dl.util.concurrent.Executor getEventsQueue()
          Returns the Executor of events.
 FwSessionProperties getFwProperties()
           
 org.csapi.fw.fw_access.trust_and_security.IpInitial getInitial()
          Returns the Initial object used by this bean.
 ORBHandler getOrbHandler()
           
 SABean getSABean()
          This method will return a previously created instance of the Servcie Agreement bean.
 int getState()
          Returns the current state of this bean.
 void initialize()
          This method must be called before attempting to make any parlay requests via this object.
 org.csapi.fw.fw_application.discovery.IpServiceDiscovery obtainDiscoveryInterface()
          This method will return an instance of the serviceDiscovery interface.
 void releaseDiscoveryInterface()
          This method will release an instance of the serviceDiscovery interface.
 void removeTSMBeanListener(TSMBeanListener l)
          Removes an application listener from the list of those registered on this bean.
 java.lang.String selectSigningAlgorithm()
          Select the Signing Algorithm from the signing algorithm capability list
 void setAuthenticationSequence(AuthenticationSequence newAuthenticationMechanism)
           
 void setAuthHandler(AuthenticationHandler authHandler)
           
 void setClientDomainID(org.csapi.fw.TpDomainID newClientDomainID)
          Stores the client domain ID to be used for authentication.
 void setFwAuthenticationSucceeded(boolean value)
          Called to indicate to this bean that the framework has indicated successful authentication.
 void setFwProperties(FwSessionProperties properties)
           
 void setState(int newState)
          Sets the state of this bean.
 void setTpAuthDomain(org.csapi.fw.TpAuthDomain tpAuthDomain)
           
 void shutdown()
          This method must be called when an application has no more use of this object to ensure a graceful shutdown.
 java.lang.String toString()
          Defines a method used to provide the caller with a string representation of the class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mobicents.slee.resource.parlay.fw.access.TSMBean
equals, hashCode
 

Constructor Detail

TSMBeanImpl

public TSMBeanImpl(FwSession fwSession,
                   FwSessionProperties fwProperties)
Parameters:
fwProperties -
Method Detail

initialize

public void initialize()
                throws TSMBeanException
This method must be called before attempting to make any parlay requests via this object. It is called automatically on construction except by the default constructor.

Specified by:
initialize in interface TSMBean
Throws:
TSMBeanException

toString

public java.lang.String toString()
Defines a method used to provide the caller with a string representation of the class.

Specified by:
toString in interface TSMBean
Overrides:
toString in class java.lang.Object
Returns:
This is an developer defined representation of the class object as a string

setClientDomainID

public void setClientDomainID(org.csapi.fw.TpDomainID newClientDomainID)
Stores the client domain ID to be used for authentication.

Specified by:
setClientDomainID in interface TSMBean
Parameters:
newClientDomainID - the domain ID to be used
Throws:
java.lang.IllegalStateException - if the bean is not in IDLE_STATE.

getClientDomain

public java.lang.String getClientDomain(org.csapi.fw.TpDomainID clientDomainID)
Retrieves the client domain ID to be used for checking the HA database.

Specified by:
getClientDomain in interface TSMBean
Parameters:
clientDomainID - the domain ID to be used

getClientDomainID

public org.csapi.fw.TpDomainID getClientDomainID()
Returns the client domain ID to be used for authentication.

Specified by:
getClientDomainID in interface TSMBean
Returns:
the domain ID to be used

getClientID

public java.lang.String getClientID()
Returns the client ID (without type) to be used for authentication.

Specified by:
getClientID in interface TSMBean
Returns:
the client ID to be used

getState

public int getState()
Returns the current state of this bean.

Specified by:
getState in interface TSMBean
Returns:
One of IDLE_STATE}, ACTIVE_STATE_STATE}, INTITIALIZED_STATE or INVALID_STATE_STATE.

setState

public void setState(int newState)
Sets the state of this bean.

Parameters:
newState - the new state.

getEncryptionMethod

public java.lang.String getEncryptionMethod()
Returns the encryption method chosen by the framework during the authentication sequence.

Specified by:
getEncryptionMethod in interface TSMBean
Returns:
a String containing the chosen encryption method.

getInitial

public org.csapi.fw.fw_access.trust_and_security.IpInitial getInitial()
Returns the Initial object used by this bean.

Specified by:
getInitial in interface TSMBean
Returns:
the object reference.

getAuthenticationMonitor

public java.lang.Object getAuthenticationMonitor()
Returns an object that can be used as a monitor for authentication.

Specified by:
getAuthenticationMonitor in interface TSMBean
Returns:
the object reference.

setFwAuthenticationSucceeded

public void setFwAuthenticationSucceeded(boolean value)
Called to indicate to this bean that the framework has indicated successful authentication.

Specified by:
setFwAuthenticationSucceeded in interface TSMBean
Parameters:
value - true if it successful.

shutdown

public void shutdown()
This method must be called when an application has no more use of this object to ensure a graceful shutdown.

Specified by:
shutdown in interface TSMBean

authenticate

public void authenticate()
                  throws TSMBeanException
This method will authenticate a client with the Parlay framework. The clientDomainID must be set before calling this method.

Specified by:
authenticate in interface TSMBean
Throws:
TSMBeanException
java.lang.IllegalStateException

endAccess

public void endAccess(org.csapi.fw.TpProperty[] endAccessProperties)
               throws TSMBeanException
This nethod will end a client's access session with the Parlay framework. The client must be successfully authenticated before calling this method.

Specified by:
endAccess in interface TSMBean
Parameters:
endAccessProperties - can be used to tell the framework the actions to perform when ending the access session.
Throws:
TSMBeanException
java.lang.IllegalStateException

obtainDiscoveryInterface

public org.csapi.fw.fw_application.discovery.IpServiceDiscovery obtainDiscoveryInterface()
                                                                                  throws TSMBeanException
This method will return an instance of the serviceDiscovery interface.

Specified by:
obtainDiscoveryInterface in interface TSMBean
Returns:
an instance of the serviceDiscovery interface.
Throws:
TSMBeanException
java.lang.IllegalStateException

releaseDiscoveryInterface

public void releaseDiscoveryInterface()
                               throws TSMBeanException
This method will release an instance of the serviceDiscovery interface.

Specified by:
releaseDiscoveryInterface in interface TSMBean
Throws:
TSMBeanException
java.lang.IllegalStateException

generateDigitalSignature

public byte[] generateDigitalSignature(java.lang.String text)
                                throws TSMBeanException
used to generate a digital signature using the termination text

Parameters:
text -
Returns:
@throws TSMBeanException
Throws:
TSMBeanException

selectSigningAlgorithm

public java.lang.String selectSigningAlgorithm()
                                        throws TSMBeanException
Select the Signing Algorithm from the signing algorithm capability list

Returns:
@throws TSMBeanException
Throws:
TSMBeanException

getSABean

public SABean getSABean()
This method will return a previously created instance of the Servcie Agreement bean.

Specified by:
getSABean in interface TSMBean
Returns:
an instance of the SABean.

createSABean

public SABean createSABean()
                    throws TSMBeanException
This method will create an instance of the Servcie Agreement bean. If this method has already been called the previously created instance will be returned.

Specified by:
createSABean in interface TSMBean
Returns:
an instance of the SABean.
Throws:
TSMBeanException
java.lang.IllegalStateException

destroySABean

public void destroySABean()
This method will release an instance of the Service Agreement bean.

Specified by:
destroySABean in interface TSMBean
Throws:
TSMBeanException
java.lang.IllegalStateException

removeTSMBeanListener

public void removeTSMBeanListener(TSMBeanListener l)
Removes an application listener from the list of those registered on this bean.

Specified by:
removeTSMBeanListener in interface TSMBean
Parameters:
l - The PCP User Application's implementation of the TSMBeanListener interface.

addTSMBeanListener

public void addTSMBeanListener(TSMBeanListener l)
Adds an application listener to the list of those registered on this bean.

Specified by:
addTSMBeanListener in interface TSMBean
Parameters:
l - The PCP User Application's implementation of the TSMBeanListener interface.

cleanup

public void cleanup()
This method will clean up all internal object references with the exception of registered listeners which are the responsibility of the application.

Specified by:
cleanup in interface TSMBean

fireTerminateAccess

public void fireTerminateAccess(org.mobicents.csapi.jr.slee.fw.TerminateAccessEvent e)
Method fireTerminateAccess.

Specified by:
fireTerminateAccess in interface TSMBean
Parameters:
e -

getEventsQueue

public EDU.oswego.cs.dl.util.concurrent.Executor getEventsQueue()
Description copied from interface: TSMBean
Returns the Executor of events.

Specified by:
getEventsQueue in interface TSMBean

setAuthenticationSequence

public void setAuthenticationSequence(AuthenticationSequence newAuthenticationMechanism)
                               throws TSMBeanException
Parameters:
newAuthenticationMechanism -
Throws:
TSMBeanException

getFwProperties

public FwSessionProperties getFwProperties()
Specified by:
getFwProperties in interface TSMBean
Returns:
Returns the fwProperties.

setFwProperties

public void setFwProperties(FwSessionProperties properties)
Specified by:
setFwProperties in interface TSMBean

getOrbHandler

public ORBHandler getOrbHandler()
Specified by:
getOrbHandler in interface TSMBean
Returns:
the ORBHandler for this TSM session.

setAuthHandler

public void setAuthHandler(AuthenticationHandler authHandler)
Parameters:
authHandler - The authHandler to set.

setTpAuthDomain

public void setTpAuthDomain(org.csapi.fw.TpAuthDomain tpAuthDomain)
Parameters:
tpAuthDomain - The tpAuthDomain to set.


Copyright © 2009. All Rights Reserved.