org.kuali.rice.kew.config
Class ThinClientResourceLoader

java.lang.Object
  extended by org.kuali.rice.core.lifecycle.BaseLifecycle
      extended by org.kuali.rice.core.resourceloader.ResourceLoaderContainer
          extended by org.kuali.rice.core.resourceloader.BaseResourceLoader
              extended by org.kuali.rice.kew.config.ThinClientResourceLoader
All Implemented Interfaces:
Lifecycle, ObjectLoader, ResourceLoader, ServiceLocator

public class ThinClientResourceLoader
extends BaseResourceLoader

Initializes and loads webservice resources for the Embedded plugin. Currently, the only 2 services which are exposed are the utility service and the document actions service.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Nested Class Summary
private static class ThinClientResourceLoader.CustomHttpMethodRetryHandler
           
 
Field Summary
static String CONNECTION_MANAGER_TIMEOUT
           
static String CONNECTION_TIMEOUT
           
private static String DEFAULT_CONNECTION_MANAGER_TIMEOUT
           
private static String DEFAULT_CONNECTION_TIMEOUT
           
private static String DEFAULT_IDLE_CONNECTION_THREAD_INTERVAL
           
private static String DEFAULT_IDLE_CONNECTION_TIMEOUT
           
private static String DEFAULT_MAX_CONNECTIONS
           
static String DOCUMENT_ENDPOINT
           
static String GROUP_ENDPOINT
           
private  org.apache.commons.httpclient.params.HttpClientParams httpClientParams
           
private  org.apache.commons.httpclient.util.IdleConnectionTimeoutThread ictt
           
static String IDENTITY_ENDPOINT
           
private static String IDLE_CONNECTION_THREAD_INTERVAL_PROPERTY
           
private static String IDLE_CONNECTION_TIMEOUT_PROPERTY
           
private static org.apache.log4j.Logger LOG
           
static String MAX_CONNECTIONS
           
private static String RETRY_SOCKET_EXCEPTION_PROPERTY
           
static String SECURE_DOCUMENT_ENDPOINT
           
static String SECURE_GROUP_ENDPOINT
           
static String SECURE_IDENTITY_ENDPOINT
           
static String SECURE_UTILITY_ENDPOINT
           
private  Map<String,Object> services
           
static String UTILITY_ENDPOINT
           
 
Fields inherited from interface org.kuali.rice.core.resourceloader.ResourceLoader
EMBEDDED_CLIENT_APP_RESOURCE_LOADER, EMBEDDED_PLUGIN, KSB_CONFIGURER_CONTAINER_NAME, PLUGIN_REGISTRY_LOADER_NAME, RMI_PLUGIN, ROOT_RESOURCE_LOADER_NAME, WEB_SERVICE_PLUGIN
 
Constructor Summary
ThinClientResourceLoader()
           
 
Method Summary
protected  void configureDefaultHttpClientParams(org.apache.commons.httpclient.params.HttpParams params)
           
 GroupService getGroupService()
           
protected  org.apache.commons.httpclient.HttpClient getHttpClient()
          Creates a commons HttpClient for service invocation.
 IdentityService getIdentityService()
           
 Object getService(QName serviceQName)
          Fetches the service with the given name.
protected  Object getServiceProxy(Class serviceInterface, String endpointParam, String secureEndpointParam)
           
 WorkflowDocumentActions getWorkflowDocument()
           
 WorkflowUtility getWorkflowUtility()
           
protected  void initializeHttpClientParams()
           
private  void runIdleConnectionTimeout()
          Idle connection timeout thread added as a part of the fix for ensuring that threads that timed out need to be cleaned or and send back to the pool so that other clients can use it.
 void start()
           
 void stop()
           
 
Methods inherited from class org.kuali.rice.core.resourceloader.BaseResourceLoader
getClassLoader, getContents, getObject, getServiceLocator, isPostProcessContainer, postProcessObject, postProcessService, setClassLoader, setPostProcessContainer, wrap
 
Methods inherited from class org.kuali.rice.core.resourceloader.ResourceLoaderContainer
addResourceLoader, addResourceLoaderFirst, containsResourceLoader, getName, getResourceLoader, getResourceLoaderNames, getResourceLoaders, removeAllResourceLoaders, removeResourceLoader, setName, toString
 
Methods inherited from class org.kuali.rice.core.lifecycle.BaseLifecycle
isStarted, setStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.core.resourceloader.ResourceLoader
addResourceLoader, addResourceLoaderFirst, getName, getResourceLoader, getResourceLoaderNames, getResourceLoaders, removeResourceLoader, setName
 
Methods inherited from interface org.kuali.rice.core.lifecycle.Lifecycle
isStarted
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG

DEFAULT_MAX_CONNECTIONS

private static final String DEFAULT_MAX_CONNECTIONS
See Also:
Constant Field Values

DEFAULT_CONNECTION_TIMEOUT

private static final String DEFAULT_CONNECTION_TIMEOUT
See Also:
Constant Field Values

DEFAULT_CONNECTION_MANAGER_TIMEOUT

private static final String DEFAULT_CONNECTION_MANAGER_TIMEOUT
See Also:
Constant Field Values

MAX_CONNECTIONS

public static final String MAX_CONNECTIONS
See Also:
Constant Field Values

CONNECTION_TIMEOUT

public static final String CONNECTION_TIMEOUT
See Also:
Constant Field Values

CONNECTION_MANAGER_TIMEOUT

public static final String CONNECTION_MANAGER_TIMEOUT
See Also:
Constant Field Values

DOCUMENT_ENDPOINT

public static final String DOCUMENT_ENDPOINT
See Also:
Constant Field Values

SECURE_DOCUMENT_ENDPOINT

public static final String SECURE_DOCUMENT_ENDPOINT
See Also:
Constant Field Values

UTILITY_ENDPOINT

public static final String UTILITY_ENDPOINT
See Also:
Constant Field Values

SECURE_UTILITY_ENDPOINT

public static final String SECURE_UTILITY_ENDPOINT
See Also:
Constant Field Values

IDENTITY_ENDPOINT

public static final String IDENTITY_ENDPOINT
See Also:
Constant Field Values

SECURE_IDENTITY_ENDPOINT

public static final String SECURE_IDENTITY_ENDPOINT
See Also:
Constant Field Values

GROUP_ENDPOINT

public static final String GROUP_ENDPOINT
See Also:
Constant Field Values

SECURE_GROUP_ENDPOINT

public static final String SECURE_GROUP_ENDPOINT
See Also:
Constant Field Values

IDLE_CONNECTION_THREAD_INTERVAL_PROPERTY

private static final String IDLE_CONNECTION_THREAD_INTERVAL_PROPERTY
See Also:
Constant Field Values

IDLE_CONNECTION_TIMEOUT_PROPERTY

private static final String IDLE_CONNECTION_TIMEOUT_PROPERTY
See Also:
Constant Field Values

DEFAULT_IDLE_CONNECTION_THREAD_INTERVAL

private static final String DEFAULT_IDLE_CONNECTION_THREAD_INTERVAL
See Also:
Constant Field Values

DEFAULT_IDLE_CONNECTION_TIMEOUT

private static final String DEFAULT_IDLE_CONNECTION_TIMEOUT
See Also:
Constant Field Values

RETRY_SOCKET_EXCEPTION_PROPERTY

private static final String RETRY_SOCKET_EXCEPTION_PROPERTY
See Also:
Constant Field Values

services

private Map<String,Object> services

ictt

private org.apache.commons.httpclient.util.IdleConnectionTimeoutThread ictt

httpClientParams

private org.apache.commons.httpclient.params.HttpClientParams httpClientParams
Constructor Detail

ThinClientResourceLoader

public ThinClientResourceLoader()
Method Detail

start

public void start()
           throws Exception
Specified by:
start in interface Lifecycle
Overrides:
start in class BaseResourceLoader
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface Lifecycle
Overrides:
stop in class BaseResourceLoader
Throws:
Exception

getService

public Object getService(QName serviceQName)
Description copied from interface: ServiceLocator
Fetches the service with the given name.

Specified by:
getService in interface ServiceLocator
Overrides:
getService in class BaseResourceLoader

getWorkflowUtility

public WorkflowUtility getWorkflowUtility()

getWorkflowDocument

public WorkflowDocumentActions getWorkflowDocument()

getIdentityService

public IdentityService getIdentityService()

getGroupService

public GroupService getGroupService()

getServiceProxy

protected Object getServiceProxy(Class serviceInterface,
                                 String endpointParam,
                                 String secureEndpointParam)

getHttpClient

protected org.apache.commons.httpclient.HttpClient getHttpClient()
Creates a commons HttpClient for service invocation. Config parameters that start with http.* are used to configure the client. TODO we need to add support for other invocation protocols and implementations, but for now...


initializeHttpClientParams

protected void initializeHttpClientParams()

configureDefaultHttpClientParams

protected void configureDefaultHttpClientParams(org.apache.commons.httpclient.params.HttpParams params)

runIdleConnectionTimeout

private void runIdleConnectionTimeout()
Idle connection timeout thread added as a part of the fix for ensuring that threads that timed out need to be cleaned or and send back to the pool so that other clients can use it.



Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.