public abstract class AbstractAutomationClient extends Object implements AutomationClient
Modifier and Type | Method and Description |
---|---|
void |
asyncExec(Runnable runnable) |
<T> T |
getAdapter(Session session,
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 a new session.
|
Session |
getSession(LoginCallback loginCb)
Create a new session using the given login callback to gather login info.
|
void |
getSession(LoginCallback loginCb,
AsyncCallback<Session> cb)
Create asynchronously a new session using the given login callback to
gather login info.
|
Session |
getSession(String token)
Creates a new session using the given token.
|
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.
|
Session |
getSession(TokenCallback cb)
Creates a new session using the given token callback by following these
steps:
Look for a token saved locally using
TokenCallback.getLocalToken()
If it doesn't exist, use
TokenCallback#getRemoteToken(java.util.Map)) to acquire a token
remotely using the information gathered by
TokenCallback.getTokenParams() , and save the token locally using
TokenCallback.saveToken(String)
Get a session with the token using AutomationClient.getSession(String)
|
void |
registerAdapter(AdapterFactory<?> factory)
Register an adapter for a given type.
|
void |
registerPojoMarshaller(Class clazz)
Marshaller registration for pojo bean
|
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 |
setSharedRegistryExpirationDelay(long delay) |
void |
shutdown()
Cleanup any resources held by this client.
|
public RequestInterceptor getRequestInterceptor()
public void setRequestInterceptor(RequestInterceptor interceptor)
setRequestInterceptor
in interface AutomationClient
public String getBaseUrl()
AutomationClient
getBaseUrl
in interface AutomationClient
public void registerAdapter(AdapterFactory<?> factory)
AutomationClient
registerAdapter
in interface AutomationClient
public <T> T getAdapter(Session session, Class<T> adapterType)
AutomationClient
Optional operation. Framework that doesn't supports reflection like GWT
must throw UnsupportedOperationException
getAdapter
in interface AutomationClient
public void shutdown()
AutomationClient
shutdown
in interface AutomationClient
public Session getSession()
AutomationClient
getSession
in interface AutomationClient
public Session getSession(String username, String password)
AutomationClient
getSession
in interface AutomationClient
public Session getSession(String token)
AutomationClient
getSession
in interface AutomationClient
public Session getSession(TokenCallback cb)
AutomationClient
TokenCallback.getLocalToken()
TokenCallback#getRemoteToken(java.util.Map))
to acquire a token
remotely using the information gathered by
TokenCallback.getTokenParams()
, and save the token locally using
TokenCallback.saveToken(String)
AutomationClient.getSession(String)
getSession
in interface AutomationClient
public void getSession(String username, String password, AsyncCallback<Session> cb)
AutomationClient
getSession
in interface AutomationClient
public Session getSession(LoginCallback loginCb)
AutomationClient
getSession
in interface AutomationClient
public void getSession(LoginCallback loginCb, AsyncCallback<Session> cb)
AutomationClient
getSession
in interface AutomationClient
public void getSession(AsyncCallback<Session> cb)
AutomationClient
getSession
in interface AutomationClient
public void asyncExec(Runnable runnable)
public void setSharedRegistryExpirationDelay(long delay)
public void registerPojoMarshaller(Class clazz)
AutomationClient
registerPojoMarshaller
in interface AutomationClient
clazz
- the pojo bean to add to MarshallingCopyright © 2014 Nuxeo SA. All rights reserved.