Class GlueWSClientContentProvider
java.lang.Object
com.webmethods.caf.faces.bean.PageFlowScopeAdapter
com.webmethods.caf.faces.data.object.ObjectMethodContentProvider
com.webmethods.caf.faces.data.ws.BaseWSClientContentProvider
com.webmethods.caf.faces.data.ws.glue.GlueWSClientContentProvider
- All Implemented Interfaces:
IPageFlowScopeAdapter
,IContentProvider
,IRefreshable
,IRefreshableContentProvider
,IUpdateableContentProvider
,Serializable
,EventListener
,HttpSessionBindingListener
"Glue via wsclient" implementation of the web services client provider
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AuthCredentials
protected List<IFailedAuthCallback>
protected String[]
protected boolean
protected int
protected boolean
Fields inherited from class com.webmethods.caf.faces.data.ws.BaseWSClientContentProvider
endpointAddress, jndiContext, WSCLIENT_ENV_AUTHMETHOD, WSCLIENT_ENV_ENDPOINTADDRESS, WSCLIENT_ENV_PASSWORD, WSCLIENT_ENV_REQUIRESAUTH, WSCLIENT_ENV_SOCKETTIMEOUT, WSCLIENT_ENV_USERNAME, wsdlUrl
Fields inherited from class com.webmethods.caf.faces.data.object.ObjectMethodContentProvider
autoRefresh, errorHandler, method, methodArgs, methodName, needRefresh, objectInstance, objectType, output, parameterNames, parameters, parameterTypes, PROPERTY_KEYS, PROPERTYKEY_OUTPUT, PROPERTYKEY_PARAMETERS, PROPERTYKEY_RESULT, result
Fields inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
fExpireWithPageFlow
-
Constructor Summary
ConstructorsConstructorDescriptionGlueWSClientContentProvider
(Class<?> objectType, String method, String[] parameterNames) Initializes provider with web service proxy class, method name to invoke and method parameter names.GlueWSClientContentProvider
(Class<?> objectType, String method, String[] parameterNames, Class<?>[] parameterTypes) Initializes provider with web service proxy class, method name to invoke and method parameter names. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFailedAuthCallback
(IFailedAuthCallback callback) Add a failed auth callback to the WSClientprotected void
Returns currently used auth credentials info.protected String[]
Return array of Glue maps urlsprotected Object
Returns web service proxy instance to use for method invocationprotected Object
getParameterValue
(Object parameterName) int
Returns currently set socket timeout.protected void
boolean
Returns true if session re-use is enabled for service calls.boolean
Returns true if the service calls caching is enabled.void
removeFailedAuthCallback
(IFailedAuthCallback callback) Remove the failed auth callbackvoid
setAuthCredentials
(AuthCredentials authCredentials) Sets new auth credentials infoprotected void
protected void
setMapUrls
(String[] mapsUrls) Sets urls of the Glue generated map filesvoid
setReuseSession
(boolean reuseSession) If true, enables session re-use for service callsvoid
setSocketTimeout
(int socketTimeout) Sets new timeout value in millisecondsvoid
setUseCache
(boolean useCache) If true, the service calls will be cached.Methods inherited from class com.webmethods.caf.faces.data.ws.BaseWSClientContentProvider
getApplicationName, getEndpointAddress, getWsdlUrl, lookupEnviromentValue, lookupEnviromentValue, release, setEndpointAddress, setWsdlUrl, valueBound, valueUnbound
Methods inherited from class com.webmethods.caf.faces.data.object.ObjectMethodContentProvider
getErrorHandler, getMethod, getMethodArgs, getMethodName, getNeedRefresh, getObjectType, getParameterNames, getParameterType, getParameterTypes, getPropertyKeys, getType, getValue, hasProperty, isAutoRefresh, isReadOnly, isSessionExpired, refresh, setAutoRefresh, setCookie, setErrorHandler, setNeedRefresh, setObjectInstance, setObjectType, setValue, supportsAutoRefresh
Methods inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
getExpireWithPageFlow, setExpireWithPageFlow
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.webmethods.caf.faces.data.IContentProvider
toString
-
Field Details
-
useCache
protected boolean useCache -
reuseSession
protected boolean reuseSession -
socketTimeout
protected int socketTimeout -
authCredentials
-
mapUrls
-
fFailedAuthCallbacks
-
-
Constructor Details
-
GlueWSClientContentProvider
Initializes provider with web service proxy class, method name to invoke and method parameter names.- Parameters:
objectType
- the web service proxy classmethod
- method to invoke on the proxyparameterNames
- parameter names of the method
-
GlueWSClientContentProvider
public GlueWSClientContentProvider(Class<?> objectType, String method, String[] parameterNames, Class<?>[] parameterTypes) Initializes provider with web service proxy class, method name to invoke and method parameter names.- Parameters:
objectType
- the web service proxy classmethod
- method to invoke on the proxyparameterNames
- parameter names of the method
-
-
Method Details
-
initParams
protected void initParams()- Overrides:
initParams
in classBaseWSClientContentProvider
-
getObjectInstance
Returns web service proxy instance to use for method invocation- Specified by:
getObjectInstance
in classBaseWSClientContentProvider
- Returns:
- proxy object
- Throws:
ContentProviderException
- if cannot obtain the proxy
-
addFailedAuthCallback
Add a failed auth callback to the WSClient- Parameters:
callback
- the callback for handling failed auth
-
removeFailedAuthCallback
Remove the failed auth callback- Parameters:
callback
- the callback to remove
-
getMapUrls
Return array of Glue maps urls- Returns:
- urls of the Glue generated map files
-
setMapUrls
Sets urls of the Glue generated map files- Parameters:
mapsUrls
- urls
-
getAuthCredentials
Returns currently used auth credentials info. Default is empty auth info.- Returns:
- auth credentials for the web service call
-
setAuthCredentials
Sets new auth credentials info- Parameters:
authCredentials
- new credentials
-
isReuseSession
public boolean isReuseSession()Returns true if session re-use is enabled for service calls. Default is true.- Returns:
- false if a new session is created for every call
-
setReuseSession
public void setReuseSession(boolean reuseSession) If true, enables session re-use for service calls- Parameters:
reuseSession
- false to disable session re-use
-
getSocketTimeout
public int getSocketTimeout()Returns currently set socket timeout. Default 60000 (1 minute).- Returns:
- timeout in milliseconds
-
setSocketTimeout
public void setSocketTimeout(int socketTimeout) Sets new timeout value in milliseconds- Parameters:
socketTimeout
- new timeout
-
isUseCache
public boolean isUseCache()Returns true if the service calls caching is enabled. Default is false. Caching is done for every unique input parameter combination.- Returns:
- true if service caching is enabled.
-
setUseCache
public void setUseCache(boolean useCache) If true, the service calls will be cached. IMPORTANT: don't use this if your data is volatile.- Parameters:
useCache
- true to enable caching
-
getParameterValue
- Overrides:
getParameterValue
in classObjectMethodContentProvider
-
setCookie
-
clearCookie
protected void clearCookie()- Overrides:
clearCookie
in classObjectMethodContentProvider
-