org.mobicents.slee.resource.http
Class HttpServletResourceAdaptor

java.lang.Object
  extended by org.mobicents.slee.resource.http.HttpServletResourceAdaptor
All Implemented Interfaces:
javax.slee.resource.ResourceAdaptor

public class HttpServletResourceAdaptor
extends java.lang.Object
implements javax.slee.resource.ResourceAdaptor


Field Summary
 
Fields inherited from interface javax.slee.resource.ResourceAdaptor
SBB_PROCESSED_EVENT
 
Constructor Summary
HttpServletResourceAdaptor()
          ...
 
Method Summary
 void activityEnded(javax.slee.resource.ActivityHandle activityHandle)
          implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 301 for further information.
 void activityUnreferenced(javax.slee.resource.ActivityHandle activityHandle)
          implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 301 for further information.
 void endHttpSessionActivity(java.lang.String sessionId)
          This method is called to end the HttpSession activity
 void entityActivated()
          implements javax.slee.resource.ResourceAdaptor The JSLEE v1.1 Specification does not include entityActivated().
 void entityCreated(javax.slee.resource.BootstrapContext bootstrapContext)
          Implements javax.slee.resource.ResourceAdaptor.
 void entityDeactivated()
          implements javax.slee.resource.ResourceAdaptor The JSLEE v1.1 Specification does not include entityDeactivated().
 void entityDeactivating()
          This method is called in context of project Mobicents in context of resource adaptor deactivation.
 void entityRemoved()
          implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 299 for further information.
 void eventProcessingFailed(javax.slee.resource.ActivityHandle activityHandle, java.lang.Object event, int param, javax.slee.Address address, int flags, javax.slee.resource.FailureReason failureReason)
          implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 300 for further information.
 void eventProcessingSuccessful(javax.slee.resource.ActivityHandle activityHandle, java.lang.Object event, int param, javax.slee.Address address, int flags)
          implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 300 for further information.
 java.lang.Object getActivity(javax.slee.resource.ActivityHandle activityHandle)
           
 javax.slee.resource.ActivityHandle getActivityHandle(java.lang.Object object)
          implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 301 for further information.
protected  HttpSessionActivityImpl getHttpSessionActivityImpl(javax.servlet.http.HttpSession httpSession)
           
 javax.slee.resource.Marshaler getMarshaler()
          implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 302 for further information.
 java.lang.Object getSBBResourceAdaptorInterface(java.lang.String str)
          implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 302 for further information.
 void onRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Called by net.java.slee.resource.diameter.HttpServletResourceEntryPoint class when http request is received.
 void queryLiveness(javax.slee.resource.ActivityHandle activityHandle)
          implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 301 for further information.
 void serviceActivated(java.lang.String serviceID)
          implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 303 for further information.
 void serviceDeactivated(java.lang.String serviceID)
          implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 304 for further information.
 void serviceInstalled(java.lang.String serviceID, int[] eventIDs, java.lang.String[] resourceOptions)
          implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 302 for further information.
 void serviceUninstalled(java.lang.String serviceID)
          implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 303 for further information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpServletResourceAdaptor

public HttpServletResourceAdaptor()
...

Method Detail

entityCreated

public void entityCreated(javax.slee.resource.BootstrapContext bootstrapContext)
                   throws javax.slee.resource.ResourceException
Implements javax.slee.resource.ResourceAdaptor. Please refer to JSLEE v1.1 Specification Page 298 for further information.
This method is called by the SLEE when a resource adaptor object instance is bootstrapped, either when a resource adaptor entity is created or during SLEE startup. The SLEE implementation will construct the resource adaptor object and then invoke the entityCreated method before any other operations can be invoked on the resource adaptor object.

Specified by:
entityCreated in interface javax.slee.resource.ResourceAdaptor
Throws:
javax.slee.resource.ResourceException

entityRemoved

public void entityRemoved()
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 299 for further information.
This method is called by the SLEE when a resource adaptor object instance is being removed, either when a resource adaptor entity is deleted or during SLEE shutdown. When receiving this invocation the resource adaptor object is expected to close any system resources it has allocated.

Specified by:
entityRemoved in interface javax.slee.resource.ResourceAdaptor

entityActivated

public void entityActivated()
                     throws javax.slee.resource.ResourceException
implements javax.slee.resource.ResourceAdaptor The JSLEE v1.1 Specification does not include entityActivated(). However, the API description of JSLEE v1.1 does include this method already. So, the documentation follows the code.
This method is called in context of project Mobicents in context of resource adaptor activation. More precisely, org.mobicents.slee.resource.ResourceAdaptorEntity.activate() calls this method entityActivated(). This method signals the resource adaptor the transition from state "INACTIVE" to state "ACTIVE".

Specified by:
entityActivated in interface javax.slee.resource.ResourceAdaptor
Throws:
javax.slee.resource.ResourceException

entityDeactivated

public void entityDeactivated()
implements javax.slee.resource.ResourceAdaptor The JSLEE v1.1 Specification does not include entityDeactivated(). However, the API description of JSLEE v1.1 does include this method already. So, the documentation follows the code.
This method is called in context of project Mobicents in context of resource adaptor deactivation. More precisely, org.mobicents.slee.resource.ResourceAdaptorEntity.deactivate() calls this method entityDeactivated(). The method call is done AFTER the call to entityDeactivating(). This method signals the resource adaptor the transition from state "STOPPING" to state "INACTIVE".

Specified by:
entityDeactivated in interface javax.slee.resource.ResourceAdaptor

entityDeactivating

public void entityDeactivating()
This method is called in context of project Mobicents in context of resource adaptor deactivation. More precisely, org.mobicents.slee.resource.ResourceAdaptorEntity.deactivate() calls this method entityDeactivating() PRIOR to invoking entityDeactivated(). This method signals the resource adaptor the transition from state "ACTIVE" to state "STOPPING".

Specified by:
entityDeactivating in interface javax.slee.resource.ResourceAdaptor

eventProcessingSuccessful

public void eventProcessingSuccessful(javax.slee.resource.ActivityHandle activityHandle,
                                      java.lang.Object event,
                                      int param,
                                      javax.slee.Address address,
                                      int flags)
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 300 for further information.
The SLEE calls this method to inform the resource adaptor object that the specified event was processed successfully by the SLEE. An event is considered to be processed successfully if the SLEE has attempted to deliver the event to all interested SBBs.

Specified by:
eventProcessingSuccessful in interface javax.slee.resource.ResourceAdaptor

eventProcessingFailed

public void eventProcessingFailed(javax.slee.resource.ActivityHandle activityHandle,
                                  java.lang.Object event,
                                  int param,
                                  javax.slee.Address address,
                                  int flags,
                                  javax.slee.resource.FailureReason failureReason)
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 300 for further information.
The SLEE calls this method to inform the resource adaptor object that the specified event was processed unsuccessfully by the SLEE. Event processing can fail if, for example, the SLEE doesn�t have enough resource to process the event, a SLEE node fails during event processing or a system level failure prevents the SLEE from committing transactions.

Specified by:
eventProcessingFailed in interface javax.slee.resource.ResourceAdaptor

activityEnded

public void activityEnded(javax.slee.resource.ActivityHandle activityHandle)
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 301 for further information.
The SLEE calls this method to inform the resource adaptor that the SLEE has completed activity end processing for the activity represented by the activity handle. The resource adaptor should release any resource related to this activity as the SLEE will not ask for it again.

Specified by:
activityEnded in interface javax.slee.resource.ResourceAdaptor

activityUnreferenced

public void activityUnreferenced(javax.slee.resource.ActivityHandle activityHandle)
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 301 for further information.
The SLEE calls this method to inform the resource adaptor that the activity�s Activity Context object is no longer attached to any SBB entities and is no longer referenced by any SLEE Facilities.

Specified by:
activityUnreferenced in interface javax.slee.resource.ResourceAdaptor

queryLiveness

public void queryLiveness(javax.slee.resource.ActivityHandle activityHandle)
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 301 for further information.
The SLEE calls this method to query if a specific activity belonging to this resource adaptor object is alive.

Specified by:
queryLiveness in interface javax.slee.resource.ResourceAdaptor

getActivity

public java.lang.Object getActivity(javax.slee.resource.ActivityHandle activityHandle)
Specified by:
getActivity in interface javax.slee.resource.ResourceAdaptor

getActivityHandle

public javax.slee.resource.ActivityHandle getActivityHandle(java.lang.Object object)
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 301 for further information.
The SLEE calls this method to get an activity handle for an activity created by the underlying resource. This method is invoked by the SLEE when it needs to construct an activity context for an activity via an activity context interface factory method invoked by an SBB.

Specified by:
getActivityHandle in interface javax.slee.resource.ResourceAdaptor

getSBBResourceAdaptorInterface

public java.lang.Object getSBBResourceAdaptorInterface(java.lang.String str)
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 302 for further information.
The SLEE calls this method to get access to the underlying resource adaptor interface that enables the SBB to invoke the resource adaptor, to send messages for example.

Specified by:
getSBBResourceAdaptorInterface in interface javax.slee.resource.ResourceAdaptor

getMarshaler

public javax.slee.resource.Marshaler getMarshaler()
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 302 for further information.
The SLEE calls this method to get reference to the Marshaler object. The resource adaptor implements the Marshaler interface. The Marshaler is used by the SLEE to convert between object and distributable forms of events and event handles.

Specified by:
getMarshaler in interface javax.slee.resource.ResourceAdaptor

serviceInstalled

public void serviceInstalled(java.lang.String serviceID,
                             int[] eventIDs,
                             java.lang.String[] resourceOptions)
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 302 for further information.
The SLEE calls this method to signify to the resource adaptor that a service has been installed and is interested in a specific set of events. The SLEE passes an event filter which identifies a set of event types that services in the SLEE are interested in. The SLEE calls this method once a service is installed.

Specified by:
serviceInstalled in interface javax.slee.resource.ResourceAdaptor

serviceUninstalled

public void serviceUninstalled(java.lang.String serviceID)
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 303 for further information.
The SLEE calls this method to signify that a service has been un-installed in the SLEE. The event types associated to the service key are no longer of interest to a particular application.

Specified by:
serviceUninstalled in interface javax.slee.resource.ResourceAdaptor

serviceActivated

public void serviceActivated(java.lang.String serviceID)
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 303 for further information.
The SLEE calls this method to inform the resource adaptor that a service has been activated and is interested in the event types associated to the service key. The service must be installed with the resource adaptor via the serviceInstalled method before it can be activated.

Specified by:
serviceActivated in interface javax.slee.resource.ResourceAdaptor

serviceDeactivated

public void serviceDeactivated(java.lang.String serviceID)
implements javax.slee.resource.ResourceAdaptor Please refer to JSLEE v1.1 Specification Page 304 for further information.
The SLEE calls this method to inform the SLEE that a service has been deactivated and is no longer interested in the event types associated to the service key.

Specified by:
serviceDeactivated in interface javax.slee.resource.ResourceAdaptor

onRequest

public void onRequest(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
Called by net.java.slee.resource.diameter.HttpServletResourceEntryPoint class when http request is received.


endHttpSessionActivity

public void endHttpSessionActivity(java.lang.String sessionId)
This method is called to end the HttpSession activity

Parameters:
incomingRequest -

getHttpSessionActivityImpl

protected HttpSessionActivityImpl getHttpSessionActivityImpl(javax.servlet.http.HttpSession httpSession)
                                                      throws java.lang.NullPointerException,
                                                             java.lang.IllegalStateException,
                                                             javax.slee.resource.ActivityAlreadyExistsException,
                                                             javax.slee.resource.CouldNotStartActivityException
Throws:
java.lang.NullPointerException
java.lang.IllegalStateException
javax.slee.resource.ActivityAlreadyExistsException
javax.slee.resource.CouldNotStartActivityException


Copyright © 2008. All Rights Reserved.