public class ClientFactory
extends java.lang.Object
AdministrationClient
,
ExpressionClient
,
FunctionClient
,
WebdavApiClient
Constructor and Description |
---|
ClientFactory() |
Modifier and Type | Method and Description |
---|---|
static AdministrationClient |
getAdministrationClient(java.lang.String serviceUrl)
Returns an instance of a client given the service URL.
|
static AdministrationClient |
getAdministrationClient(java.lang.String serviceUrl,
java.lang.String userName,
java.lang.String password)
Returns an instance of a client given the service URL and user credentials.
|
static ExpressionClient |
getExpressionClient(java.lang.String serviceUrl)
Returns an instance of a client given the service URL.
|
static ExpressionClient |
getExpressionClient(java.lang.String serviceUrl,
java.lang.String userName,
java.lang.String password)
Returns an instance of a client given the service URL and user credentials.
|
static FunctionClient |
getFunctionClient(java.lang.String serviceUrl)
Returns an instance of a client given the service URL.
|
static FunctionClient |
getFunctionClient(java.lang.String serviceUrl,
java.lang.String userName,
java.lang.String password)
Returns an instance of a client given the service URL and user credentials.
|
static int |
getNotificationReceiverPort()
Retrieves the port to use when listening for notifications from the server.
|
static NotificationType |
getNotificationType()
Retrieves the notification mechanism used.
|
static WebdavApiClient |
getWebdavClient(java.lang.String serviceUrl)
Returns an instance of a client given the service URL.
|
static WebdavApiClient |
getWebdavClient(java.lang.String serviceUrl,
java.lang.String userName,
java.lang.String password)
Returns an instance of a client given the service URL and user credentials.
|
static void |
setNotificationReceiverPort(int portToUse)
Set the port to use when listening for notifications from the server.
|
static void |
setNotificationType(NotificationType notificationType)
Which notification mechanism to use (polling of UDP); defaults to UDP.
|
public static NotificationType getNotificationType()
notificationType
- The notification type. Can be either UDP callback or polling.public static void setNotificationType(NotificationType notificationType)
notificationType
- The notification type. Can be either UDP callback or polling.public static void setNotificationReceiverPort(int portToUse)
portToUse
- An integer specifying which port to use.public static int getNotificationReceiverPort()
public static AdministrationClient getAdministrationClient(java.lang.String serviceUrl) throws NotAuthenticatedException, ApiException, ServerCreationException
serviceUrl
- The URL of the server. A trailing slash is optional.AdministrationClient
.NotAuthenticatedException
- if the server requires authenticationApiException
ServerCreationException
- if the server request could not be created.public static AdministrationClient getAdministrationClient(java.lang.String serviceUrl, java.lang.String userName, java.lang.String password) throws NotAuthenticatedException, ApiException, ServerCreationException
NULL
user name and NULL
password,
results in a ServerCreationException
. If you want to log on anonymously (that is, pass in
neither user name nor password), use getAdministrationClient(String)
.serviceUrl
- The URL of the server. A trailing slash is optional.userName
- The user's login name.password
- The password of the user specified by userName
.AdministrationClient
.ApiException
NotAuthenticatedException
- if the user name or password could not be authenticated.ServerCreationException
- if the server request could not be created.public static ExpressionClient getExpressionClient(java.lang.String serviceUrl) throws NotAuthenticatedException, ApiException, ServerCreationException
serviceUrl
- The URL of the server. A trailing slash is optional.ExpressionClient
.NotAuthenticatedException
- if the user name or password could not be authenticated.ApiException
ServerCreationException
- if the server request could not be created.public static ExpressionClient getExpressionClient(java.lang.String serviceUrl, java.lang.String userName, java.lang.String password) throws NotAuthenticatedException, ApiException, ServerCreationException
serviceUrl
- The URL of the server. A trailing slash is optional.userName
- The user's login name.password
- The password of the user specified by userName
.ExpressionClient
.ApiException
NotAuthenticatedException
- if the user name or password could not be authenticated.ServerCreationException
- if the server request could not be created.public static FunctionClient getFunctionClient(java.lang.String serviceUrl) throws NotAuthenticatedException, ApiException, ServerCreationException
serviceUrl
- The URL of the server. A trailing slash is optional.FunctionClient
.NotAuthenticatedException
- if the user name or password could not be authenticated.ApiException
ServerCreationException
- if the server request could not be created.public static FunctionClient getFunctionClient(java.lang.String serviceUrl, java.lang.String userName, java.lang.String password) throws NotAuthenticatedException, ApiException, ServerCreationException
serviceUrl
- The URL of the server. A trailing slash is optional.userName
- The user's login name.password
- The password of the user specified by userName
.FunctionClient
.ApiException
NotAuthenticatedException
- if the user name or password could not be authenticated.ServerCreationException
- if the server request could not be created.public static WebdavApiClient getWebdavClient(java.lang.String serviceUrl) throws NotAuthenticatedException, ApiException, ServerCreationException
serviceUrl
- The URL of the server. A trailing slash is optional.WebdavClient
.NotAuthenticatedException
- if the user name or password could not be authenticated.ApiException
ServerCreationException
- if the server request could not be created.public static WebdavApiClient getWebdavClient(java.lang.String serviceUrl, java.lang.String userName, java.lang.String password) throws NotAuthenticatedException, ApiException, ServerCreationException
serviceUrl
- The URL of the server. A trailing slash is optional.userName
- The user's login name.password
- The password of the user specified by userName
.WebdavClient
.ApiException
NotAuthenticatedException
- if the user name or password could not be authenticated.ServerCreationException
- if the server request could not be created.