Class GlueWSClientContentProvider

All Implemented Interfaces:
IPageFlowScopeAdapter, IContentProvider, IRefreshable, IRefreshableContentProvider, IUpdateableContentProvider, Serializable, EventListener, HttpSessionBindingListener

public class GlueWSClientContentProvider extends BaseWSClientContentProvider

"Glue via wsclient" implementation of the web services client provider

See Also:
  • Field Details

    • useCache

      protected boolean useCache
    • reuseSession

      protected boolean reuseSession
    • socketTimeout

      protected int socketTimeout
    • authCredentials

      protected AuthCredentials authCredentials
    • mapUrls

      protected String[] mapUrls
    • fFailedAuthCallbacks

      protected List<IFailedAuthCallback> fFailedAuthCallbacks
  • Constructor Details

    • GlueWSClientContentProvider

      public GlueWSClientContentProvider(Class<?> objectType, String method, String[] parameterNames)
      Initializes provider with web service proxy class, method name to invoke and method parameter names.
      Parameters:
      objectType - the web service proxy class
      method - method to invoke on the proxy
      parameterNames - 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 class
      method - method to invoke on the proxy
      parameterNames - parameter names of the method
  • Method Details

    • initParams

      protected void initParams()
      Overrides:
      initParams in class BaseWSClientContentProvider
    • getObjectInstance

      protected Object getObjectInstance() throws ContentProviderException
      Returns web service proxy instance to use for method invocation
      Specified by:
      getObjectInstance in class BaseWSClientContentProvider
      Returns:
      proxy object
      Throws:
      ContentProviderException - if cannot obtain the proxy
    • addFailedAuthCallback

      public void addFailedAuthCallback(IFailedAuthCallback callback)
      Add a failed auth callback to the WSClient
      Parameters:
      callback - the callback for handling failed auth
    • removeFailedAuthCallback

      public void removeFailedAuthCallback(IFailedAuthCallback callback)
      Remove the failed auth callback
      Parameters:
      callback - the callback to remove
    • getMapUrls

      protected String[] getMapUrls()
      Return array of Glue maps urls
      Returns:
      urls of the Glue generated map files
    • setMapUrls

      protected void setMapUrls(String[] mapsUrls)
      Sets urls of the Glue generated map files
      Parameters:
      mapsUrls - urls
    • getAuthCredentials

      public AuthCredentials getAuthCredentials()
      Returns currently used auth credentials info. Default is empty auth info.
      Returns:
      auth credentials for the web service call
    • setAuthCredentials

      public void setAuthCredentials(AuthCredentials authCredentials)
      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

      protected Object getParameterValue(Object parameterName)
      Overrides:
      getParameterValue in class ObjectMethodContentProvider
    • setCookie

      protected void setCookie(String cookie)
    • clearCookie

      protected void clearCookie()
      Overrides:
      clearCookie in class ObjectMethodContentProvider