org.mobicents.client.slee.resource.http
Class HttpClientResourceAdaptor

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

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

Author:
amit bhayani

Nested Class Summary
protected  class HttpClientResourceAdaptor.AsyncExecuteMethodHandler
           
 
Field Summary
protected  org.apache.http.client.HttpClient httpclient
           
protected  boolean isActive
           
protected  javax.slee.resource.ResourceAdaptorContext resourceAdaptorContext
           
 
Constructor Summary
HttpClientResourceAdaptor()
           
 
Method Summary
 void activityEnded(javax.slee.resource.ActivityHandle activityHandle)
           
 void activityUnreferenced(javax.slee.resource.ActivityHandle arg0)
           
 void addActivity(HttpClientActivityHandle activityHandle, HttpClientActivity activity)
          Maps the specified activity to the specified handle
 void administrativeRemove(javax.slee.resource.ActivityHandle arg0)
           
 void endActivity(HttpClientActivity activity)
          Ends the specified activity
 void eventProcessingFailed(javax.slee.resource.ActivityHandle arg0, javax.slee.resource.FireableEventType arg1, java.lang.Object arg2, javax.slee.Address arg3, javax.slee.resource.ReceivableService arg4, int arg5, javax.slee.resource.FailureReason arg6)
           
 void eventProcessingSuccessful(javax.slee.resource.ActivityHandle arg0, javax.slee.resource.FireableEventType arg1, java.lang.Object arg2, javax.slee.Address arg3, javax.slee.resource.ReceivableService arg4, int arg5)
           
 void eventUnreferenced(javax.slee.resource.ActivityHandle arg0, javax.slee.resource.FireableEventType arg1, java.lang.Object arg2, javax.slee.Address arg3, javax.slee.resource.ReceivableService arg4, int arg5)
           
 java.lang.Object getActivity(javax.slee.resource.ActivityHandle activityHandle)
           
 javax.slee.resource.ActivityHandle getActivityHandle(java.lang.Object arg0)
           
 java.util.concurrent.ExecutorService getExecutorService()
          Retrieves the executor service
 javax.slee.resource.Marshaler getMarshaler()
           
 javax.slee.resource.ResourceAdaptorContext getResourceAdaptorContext()
          Retrieves the ra context
 java.lang.Object getResourceAdaptorInterface(java.lang.String arg0)
           
 void processResponseEvent(ResponseEvent event, HttpClientActivity activity)
          Receives an Event from the HTTP client and sends it to the SLEE.
 void queryLiveness(javax.slee.resource.ActivityHandle arg0)
           
 void raActive()
           
 void raConfigurationUpdate(javax.slee.resource.ConfigProperties arg0)
           
 void raConfigure(javax.slee.resource.ConfigProperties properties)
           
 void raInactive()
           
 void raStopping()
           
 void raUnconfigure()
           
 void raVerifyConfiguration(javax.slee.resource.ConfigProperties properties)
           
 void serviceActive(javax.slee.resource.ReceivableService arg0)
           
 void serviceInactive(javax.slee.resource.ReceivableService arg0)
           
 void serviceStopping(javax.slee.resource.ReceivableService arg0)
           
 void setResourceAdaptorContext(javax.slee.resource.ResourceAdaptorContext arg0)
           
 void unsetResourceAdaptorContext()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resourceAdaptorContext

protected javax.slee.resource.ResourceAdaptorContext resourceAdaptorContext

httpclient

protected org.apache.http.client.HttpClient httpclient

isActive

protected volatile boolean isActive
Constructor Detail

HttpClientResourceAdaptor

public HttpClientResourceAdaptor()
Method Detail

setResourceAdaptorContext

public void setResourceAdaptorContext(javax.slee.resource.ResourceAdaptorContext arg0)
Specified by:
setResourceAdaptorContext in interface javax.slee.resource.ResourceAdaptor

raConfigure

public void raConfigure(javax.slee.resource.ConfigProperties properties)
Specified by:
raConfigure in interface javax.slee.resource.ResourceAdaptor

raActive

public void raActive()
Specified by:
raActive in interface javax.slee.resource.ResourceAdaptor

raStopping

public void raStopping()
Specified by:
raStopping in interface javax.slee.resource.ResourceAdaptor

raInactive

public void raInactive()
Specified by:
raInactive in interface javax.slee.resource.ResourceAdaptor

raUnconfigure

public void raUnconfigure()
Specified by:
raUnconfigure in interface javax.slee.resource.ResourceAdaptor

unsetResourceAdaptorContext

public void unsetResourceAdaptorContext()
Specified by:
unsetResourceAdaptorContext in interface javax.slee.resource.ResourceAdaptor

raVerifyConfiguration

public void raVerifyConfiguration(javax.slee.resource.ConfigProperties properties)
                           throws javax.slee.resource.InvalidConfigurationException
Specified by:
raVerifyConfiguration in interface javax.slee.resource.ResourceAdaptor
Throws:
javax.slee.resource.InvalidConfigurationException

raConfigurationUpdate

public void raConfigurationUpdate(javax.slee.resource.ConfigProperties arg0)
Specified by:
raConfigurationUpdate in interface javax.slee.resource.ResourceAdaptor

serviceActive

public void serviceActive(javax.slee.resource.ReceivableService arg0)
Specified by:
serviceActive in interface javax.slee.resource.ResourceAdaptor

serviceStopping

public void serviceStopping(javax.slee.resource.ReceivableService arg0)
Specified by:
serviceStopping in interface javax.slee.resource.ResourceAdaptor

serviceInactive

public void serviceInactive(javax.slee.resource.ReceivableService arg0)
Specified by:
serviceInactive in interface javax.slee.resource.ResourceAdaptor

getResourceAdaptorInterface

public java.lang.Object getResourceAdaptorInterface(java.lang.String arg0)
Specified by:
getResourceAdaptorInterface in interface javax.slee.resource.ResourceAdaptor

getMarshaler

public javax.slee.resource.Marshaler getMarshaler()
Specified by:
getMarshaler in interface javax.slee.resource.ResourceAdaptor

administrativeRemove

public void administrativeRemove(javax.slee.resource.ActivityHandle arg0)
Specified by:
administrativeRemove 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 arg0)
Specified by:
getActivityHandle in interface javax.slee.resource.ResourceAdaptor

queryLiveness

public void queryLiveness(javax.slee.resource.ActivityHandle arg0)
Specified by:
queryLiveness in interface javax.slee.resource.ResourceAdaptor

eventProcessingSuccessful

public void eventProcessingSuccessful(javax.slee.resource.ActivityHandle arg0,
                                      javax.slee.resource.FireableEventType arg1,
                                      java.lang.Object arg2,
                                      javax.slee.Address arg3,
                                      javax.slee.resource.ReceivableService arg4,
                                      int arg5)
Specified by:
eventProcessingSuccessful in interface javax.slee.resource.ResourceAdaptor

eventProcessingFailed

public void eventProcessingFailed(javax.slee.resource.ActivityHandle arg0,
                                  javax.slee.resource.FireableEventType arg1,
                                  java.lang.Object arg2,
                                  javax.slee.Address arg3,
                                  javax.slee.resource.ReceivableService arg4,
                                  int arg5,
                                  javax.slee.resource.FailureReason arg6)
Specified by:
eventProcessingFailed in interface javax.slee.resource.ResourceAdaptor

eventUnreferenced

public void eventUnreferenced(javax.slee.resource.ActivityHandle arg0,
                              javax.slee.resource.FireableEventType arg1,
                              java.lang.Object arg2,
                              javax.slee.Address arg3,
                              javax.slee.resource.ReceivableService arg4,
                              int arg5)
Specified by:
eventUnreferenced in interface javax.slee.resource.ResourceAdaptor

activityEnded

public void activityEnded(javax.slee.resource.ActivityHandle activityHandle)
Specified by:
activityEnded in interface javax.slee.resource.ResourceAdaptor

activityUnreferenced

public void activityUnreferenced(javax.slee.resource.ActivityHandle arg0)
Specified by:
activityUnreferenced in interface javax.slee.resource.ResourceAdaptor

getResourceAdaptorContext

public javax.slee.resource.ResourceAdaptorContext getResourceAdaptorContext()
Retrieves the ra context

Returns:

getExecutorService

public java.util.concurrent.ExecutorService getExecutorService()
Retrieves the executor service


addActivity

public void addActivity(HttpClientActivityHandle activityHandle,
                        HttpClientActivity activity)
Maps the specified activity to the specified handle

Parameters:
activityHandle -
activity -

endActivity

public void endActivity(HttpClientActivity activity)
Ends the specified activity

Parameters:
activity -

processResponseEvent

public void processResponseEvent(ResponseEvent event,
                                 HttpClientActivity activity)
Receives an Event from the HTTP client and sends it to the SLEE.

Parameters:
event -
activity -


Copyright © 2011. All Rights Reserved.