Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.automation.client.jaxrs.spi
Class AbstractAutomationClient

java.lang.Object
  extended by org.nuxeo.ecm.automation.client.jaxrs.spi.AbstractAutomationClient
All Implemented Interfaces:
AutomationClient
Direct Known Subclasses:
AsyncAutomationClient

public abstract class AbstractAutomationClient
extends Object
implements AutomationClient

Author:
Bogdan Stefanescu

Method Summary
 void asyncExec(Runnable runnable)
           
<T> T
getAdapter(Object objToAdapt, Class<T> adapterType)
          Adapts the given object to the given type.
 String getBaseUrl()
          Gets the automation service URL.
 RequestInterceptor getRequestInterceptor()
          Gets access to this request interceptor
 Session getSession()
          Creates a new session.
 void getSession(AsyncCallback<Session> cb)
          Creates asynchronously a new session.
 Session getSession(String username, String password)
          Creates a new session using the given login.
 void getSession(String username, String password, AsyncCallback<Session> cb)
          Creates asynchronously a new session using the given login.
 void registerAdapter(AdapterFactory<?> factory)
          Register an adapter for a given type.
 void setBasicAuth(String username, String password)
           
 void setRequestInterceptor(RequestInterceptor interceptor)
          Can be used for intercepting requests before they are being sent to the server.
 void shutdown()
          Cleanup any resources held by this client.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setRequestInterceptor

public void setRequestInterceptor(RequestInterceptor interceptor)
Description copied from interface: AutomationClient
Can be used for intercepting requests before they are being sent to the server.

Specified by:
setRequestInterceptor in interface AutomationClient

getRequestInterceptor

public RequestInterceptor getRequestInterceptor()
Description copied from interface: AutomationClient
Gets access to this request interceptor

Specified by:
getRequestInterceptor in interface AutomationClient

getBaseUrl

public String getBaseUrl()
Description copied from interface: AutomationClient
Gets the automation service URL.

Specified by:
getBaseUrl in interface AutomationClient

setBasicAuth

public void setBasicAuth(String username,
                         String password)

registerAdapter

public void registerAdapter(AdapterFactory<?> factory)
Description copied from interface: AutomationClient
Register an adapter for a given type. Registration is not thread safe. You should register adapters at initialization time. An adapter type can be bound to a single adaptable type.

Specified by:
registerAdapter in interface AutomationClient

getAdapter

public <T> T getAdapter(Object objToAdapt,
                        Class<T> adapterType)
Description copied from interface: AutomationClient
Adapts the given object to the given type. Return the adapter instance if any, otherwise null.

Optional operation. Framework that doesn't supports reflection like GWT must throw UnsupportedOperationException

Specified by:
getAdapter in interface AutomationClient

shutdown

public void shutdown()
Description copied from interface: AutomationClient
Cleanup any resources held by this client. After a shutdown the client is no more usable.

Specified by:
shutdown in interface AutomationClient

getSession

public Session getSession()
Description copied from interface: AutomationClient
Creates a new session. If no interceptors configured connect anonymously.

Specified by:
getSession in interface AutomationClient

getSession

public Session getSession(String username,
                          String password)
Description copied from interface: AutomationClient
Creates a new session using the given login.

Specified by:
getSession in interface AutomationClient

getSession

public void getSession(String username,
                       String password,
                       AsyncCallback<Session> cb)
Description copied from interface: AutomationClient
Creates asynchronously a new session using the given login. The given callback will be notified after the session is created.

Specified by:
getSession in interface AutomationClient

getSession

public void getSession(AsyncCallback<Session> cb)
Description copied from interface: AutomationClient
Creates asynchronously a new session. The given callback will be notified after the session is created.

Specified by:
getSession in interface AutomationClient

asyncExec

public void asyncExec(Runnable runnable)

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.