org.mobicents.slee.resource.parlay.fw.application
Class SABeanImpl

java.lang.Object
  extended by org.mobicents.slee.resource.parlay.fw.application.SABeanImpl
All Implemented Interfaces:
java.io.Serializable, SABean

public class SABeanImpl
extends java.lang.Object
implements java.io.Serializable, SABean

This class represents the framework application service agreement module. The application may use this class to identify which services it wishes to use and sign the corresponding service agreements.

See Also:
Serialized Form

Constructor Summary
SABeanImpl(TSMBean tsmBean)
          used when a TSMBean has been used to create this object.
 
Method Summary
 void addSABeanListener(SABeanListener l)
          Adds an application listener to the list of those registered on this bean.
 void cleanup()
          This method will clean up all internal object references with the exception of registered listeners which are the responsibility of the application.
 void fireTerminateServiceAgreement(org.mobicents.csapi.jr.slee.fw.TerminateServiceAgreementEvent e)
           
 byte[] generateDigitalSignature(java.lang.String text, java.lang.String serviceToken, java.lang.String signingAlgorithm)
          Called to genearte digital signature of service token and text received from framework
 org.csapi.fw.fw_application.service_agreement.IpAppServiceAgreementManagement getAppServiceAgreementManagement()
          Returns the AppServiceAgreementManagement interface.
 org.csapi.fw.fw_application.service_agreement.IpServiceAgreementManagement getServiceAgreementManagement()
          Returns the ServiceAgreementManagement interface.
 java.lang.Object getServiceAgreementMonitor()
          Returns an object that can be used as a monitor for signing service agreements.
 TSMBean getTSMBean()
          Returns the tsmBean.
 void initialise()
           
 void putServiceTokenSigningAlgorithm(java.lang.String serviceToken, java.lang.String signingAlgorithm)
           
 void removeSABeanListener(SABeanListener l)
          Removes an application listener from the list of those registered on this bean.
 java.lang.String removeSigningAlgorithm(java.lang.String serviceToken)
           
 ServiceAndToken selectAndSignServiceAgreement(java.lang.String serviceID, java.lang.String agreementText)
          This method will select a service and sign an agreement for it with the parlay framework.
 void setIsAgreementSigned(boolean value)
          Called to indicate sign service agreement has been called by the framework.
 void setServiceAgreementManagement(org.csapi.fw.fw_application.service_agreement.IpServiceAgreementManagement newServiceAgreementManagement)
          Stores the ServiceAgreementManagement interface to be used by this bean.
 void terminateServiceAgreement(java.lang.String serviceToken, java.lang.String terminationText)
          This method will terminate a service agreement with the parlay framework.
 boolean verifyDigitalSignature(java.lang.String text, java.lang.String serviceToken, java.lang.String signingAlgorithm, byte[] digitalSignature)
          Called to verify signature received from framework
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mobicents.slee.resource.parlay.fw.application.SABean
toString
 

Constructor Detail

SABeanImpl

public SABeanImpl(TSMBean tsmBean)
used when a TSMBean has been used to create this object.

Parameters:
tsmBean - the factory object.
Method Detail

initialise

public void initialise()
                throws SABeanException
Specified by:
initialise in interface SABean
Throws:
SABeanException

setServiceAgreementManagement

public void setServiceAgreementManagement(org.csapi.fw.fw_application.service_agreement.IpServiceAgreementManagement newServiceAgreementManagement)
Stores the ServiceAgreementManagement interface to be used by this bean.

Specified by:
setServiceAgreementManagement in interface SABean
Parameters:
newServiceAgreementManagement - the domain ID to be used

getServiceAgreementManagement

public org.csapi.fw.fw_application.service_agreement.IpServiceAgreementManagement getServiceAgreementManagement()
Returns the ServiceAgreementManagement interface.

Specified by:
getServiceAgreementManagement in interface SABean
Returns:
the ServiceAgreementManagement interface to be used

getAppServiceAgreementManagement

public org.csapi.fw.fw_application.service_agreement.IpAppServiceAgreementManagement getAppServiceAgreementManagement()
Returns the AppServiceAgreementManagement interface.

Specified by:
getAppServiceAgreementManagement in interface SABean
Returns:
the AppServiceAgreementManagement interface to be used

getServiceAgreementMonitor

public java.lang.Object getServiceAgreementMonitor()
Returns an object that can be used as a monitor for signing service agreements.

Specified by:
getServiceAgreementMonitor in interface SABean
Returns:
the object reference.

setIsAgreementSigned

public void setIsAgreementSigned(boolean value)
Called to indicate sign service agreement has been called by the framework.

Specified by:
setIsAgreementSigned in interface SABean
Parameters:
value - true if it has been called.

removeSABeanListener

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

Specified by:
removeSABeanListener in interface SABean
Parameters:
l - The PCP User Application's implementation of the SABeanListener interface.

addSABeanListener

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

Specified by:
addSABeanListener in interface SABean
Parameters:
l - The PCP User Application's implementation of the SABeanListener interface.

selectAndSignServiceAgreement

public ServiceAndToken selectAndSignServiceAgreement(java.lang.String serviceID,
                                                     java.lang.String agreementText)
                                              throws SABeanException
This method will select a service and sign an agreement for it with the parlay framework.

Specified by:
selectAndSignServiceAgreement in interface SABean
Returns:
the service and service token for the selected service
Throws:
SABeanException

terminateServiceAgreement

public void terminateServiceAgreement(java.lang.String serviceToken,
                                      java.lang.String terminationText)
                               throws SABeanException
This method will terminate a service agreement with the parlay framework.

Specified by:
terminateServiceAgreement in interface SABean
Throws:
SABeanException

fireTerminateServiceAgreement

public void fireTerminateServiceAgreement(org.mobicents.csapi.jr.slee.fw.TerminateServiceAgreementEvent e)
Specified by:
fireTerminateServiceAgreement in interface SABean

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. The PCP will use this when the object is no longer to be used.

Specified by:
cleanup in interface SABean

removeSigningAlgorithm

public java.lang.String removeSigningAlgorithm(java.lang.String serviceToken)
Specified by:
removeSigningAlgorithm in interface SABean

putServiceTokenSigningAlgorithm

public void putServiceTokenSigningAlgorithm(java.lang.String serviceToken,
                                            java.lang.String signingAlgorithm)
Specified by:
putServiceTokenSigningAlgorithm in interface SABean

generateDigitalSignature

public byte[] generateDigitalSignature(java.lang.String text,
                                       java.lang.String serviceToken,
                                       java.lang.String signingAlgorithm)
Description copied from interface: SABean
Called to genearte digital signature of service token and text received from framework

Specified by:
generateDigitalSignature in interface SABean
Returns:
digitalSignature

verifyDigitalSignature

public boolean verifyDigitalSignature(java.lang.String text,
                                      java.lang.String serviceToken,
                                      java.lang.String signingAlgorithm,
                                      byte[] digitalSignature)
Description copied from interface: SABean
Called to verify signature received from framework

Specified by:
verifyDigitalSignature in interface SABean
Returns:
boolean

getTSMBean

public TSMBean getTSMBean()
Returns the tsmBean.

Specified by:
getTSMBean in interface SABean
Returns:
TSMBean


Copyright © 2009. All Rights Reserved.