public class SymphonyBasicClient extends java.lang.Object implements SymphonyClient
You must init this class with valid key and session tokens with stored in a SymAuth object. Please note, that the SymAuth expires and must be updated periodically to maintain access to the Symphony network.
| Constructor and Description |
|---|
SymphonyBasicClient() |
SymphonyBasicClient(ApiVersion apiVersion) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.client.Client |
getAgentHttpClient()
Retrieve the HTTP client for Agent connectivity
|
java.lang.String |
getAgentUrl()
Returns the Agent URL used during initialization
|
AttachmentsClient |
getAttachmentsClient()
Provides instance of the Attachments client
|
SymCache |
getCache(CacheType cacheType)
Return a cache by type
CacheType |
ChatService |
getChatService()
Provides active Chat Service
|
SymphonyClientConfig |
getConfig()
Get SJC configuration
|
ConnectionsClient |
getConnectionsClient()
Provides instance of the Connections client
|
DataFeedClient |
getDataFeedClient()
Provides instance of the DataFeed client
|
javax.ws.rs.client.Client |
getDefaultHttpClient()
Provides the default http client if one is set.
|
SymUser |
getLocalUser()
Returns the local BOT user for the instantiated client.
|
MessagesClient |
getMessagesClient()
Provides instance of the Messages Client
|
MessageService |
getMessageService()
Provides active Message Service
|
java.lang.String |
getName()
Return name of SJC
|
javax.ws.rs.client.Client |
getPodHttpClient()
Retrieve the HTTP client for POD connectivity
|
java.lang.String |
getPodUrl()
Retrieve the POD url.
|
PresenceClient |
getPresenceClient()
Provides instance of the Presence client
|
PresenceService |
getPresenceService() |
RoomMembershipClient |
getRoomMembershipClient()
Provides instance of the Room Membership client
|
RoomService |
getRoomService()
Provides active Room Service
|
ShareClient |
getShareClient()
Provides instance of the Shares client.
|
StreamsClient |
getStreamsClient()
Provides instance of the Streams client
|
SymAuth |
getSymAuth()
Retrieve authorization object.
|
SymphonyApis |
getSymphonyApis()
Convenience in obtaining all underlying language binding APIs
Accessing language bindings directly is discouraged as changes are bound to REST API
|
UsersClient |
getUsersClient()
Provides instance of the Users client
|
void |
init(javax.ws.rs.client.Client podHttpClient,
javax.ws.rs.client.Client agentHttpClient,
SymphonyClientConfig config)
Initialize the SJC with a custom http client for both pod and agent connectivity.
|
void |
init(javax.ws.rs.client.Client httpClient,
SymAuth symAuth,
java.lang.String userEmail,
java.lang.String agentUrl,
java.lang.String podUrl)
Deprecated.
|
void |
init(javax.ws.rs.client.Client httpClient,
SymphonyClientConfig config)
Initialize client with required parameters and custom HTTP client.
|
void |
init(SymAuth symAuth,
java.lang.String userEmail,
java.lang.String agentUrl,
java.lang.String podUrl)
Deprecated.
|
void |
init(SymAuth symAuth,
java.lang.String userEmail,
java.lang.String agentUrl,
java.lang.String podUrl,
boolean disableServices)
Deprecated.
|
void |
init(SymAuth symAuth,
SymphonyClientConfig config)
Initialize client with required parameters.
|
void |
init(SymphonyClientConfig config) |
void |
setAgentHttpClient(javax.ws.rs.client.Client agentHttpClient)
Set the HTTP client for Agent connectivity
|
void |
setAgentUrl(java.lang.String agentUrl) |
void |
setCache(SymCache symCache)
Set a cache for types :
CacheType |
void |
setConfig(SymphonyClientConfig config)
Set SJC configuration
|
void |
setDefaultHttpClient(javax.ws.rs.client.Client defaultHttpClient)
Set a custom Http client to use when connecting to Symphony API's
|
void |
setLocalUser(SymUser localUser) |
void |
setName(java.lang.String name)
Set name of SJC to be used for threading
|
void |
setPodHttpClient(javax.ws.rs.client.Client podHttpClient)
Set the HTTP client for POD connectivity
|
void |
setPodUrl(java.lang.String podUrl) |
void |
setSymAuth(SymAuth symAuth)
Set authorization object
|
void |
shutdown()
Terminates all underlying services and threads.
|
public SymphonyBasicClient()
public SymphonyBasicClient(ApiVersion apiVersion)
public void init(SymphonyClientConfig config) throws InitException, AuthenticationException
init in interface SymphonyClientInitExceptionAuthenticationExceptionpublic void setName(java.lang.String name)
setName in interface SymphonyClientname - Used for threadingpublic java.lang.String getName()
getName in interface SymphonyClientpublic void init(javax.ws.rs.client.Client podHttpClient,
javax.ws.rs.client.Client agentHttpClient,
SymphonyClientConfig config)
throws InitException,
AuthenticationException
init in interface SymphonyClientpodHttpClient - Custom http client to use when connecting to the podagentHttpClient - Custom http client to use when connecting to the agent serverconfig - Configuration objectInitException - Exception from initializationAuthenticationException - Exception from authorization.public void init(javax.ws.rs.client.Client httpClient,
SymphonyClientConfig config)
throws InitException,
AuthenticationException
SymphonyClientinit in interface SymphonyClienthttpClient - Custom http client to use when connecting to Symphony API'sconfig - Configuration objectInitException - Failure of a specific service most likely due to connectivity issuesAuthenticationException - A network exception@Deprecated public void init(SymAuth symAuth, java.lang.String userEmail, java.lang.String agentUrl, java.lang.String podUrl) throws InitException
init in interface SymphonyClientsymAuth - Contains valid key and session tokens generated from AuthenticationClient.userEmail - Email address of the BOTagentUrl - The Agent URLpodUrl - The Service URL (in most cases it's the POD URL)InitException - Failure of a specific service most likely due to connectivity issues@Deprecated
public void init(javax.ws.rs.client.Client httpClient,
SymAuth symAuth,
java.lang.String userEmail,
java.lang.String agentUrl,
java.lang.String podUrl)
throws InitException
init in interface SymphonyClienthttpClient - Custom http client to use when initiating the clientsymAuth - Contains valid key and session tokens generated from AuthenticationClient.userEmail - Email address of the BOTagentUrl - The Agent URLpodUrl - The Service URL (in most cases it's the POD URL)InitException - Failure of a specific service most likely due to connectivity issues@Deprecated public void init(SymAuth symAuth, java.lang.String userEmail, java.lang.String agentUrl, java.lang.String podUrl, boolean disableServices) throws InitException
init in interface SymphonyClientsymAuth - Contains valid key and session tokens generated from AuthenticationClient.userEmail - Email address of the BOTagentUrl - The Agent URLpodUrl - The Service URL (in most cases it's the POD URL)disableServices - Disable all real-time services (MessageService, RoomService, ChatService)InitException - Failure of a specific service most likely due to connectivity issuespublic void init(SymAuth symAuth, SymphonyClientConfig config) throws InitException
init in interface SymphonyClientsymAuth - Contains valid key and session tokens generated from AuthenticationClient.config - Symphony client configInitException - Failure of a specific service most likely due to connectivity issuespublic SymAuth getSymAuth()
SymphonyClientgetSymAuth in interface SymphonyClientSymAuth Authorization object containing session and key tokens. This can return a null value.public void setSymAuth(SymAuth symAuth)
SymphonyClientsetSymAuth in interface SymphonyClientsymAuth - Contains valid key and session tokens generated from AuthenticationClient.public java.lang.String getAgentUrl()
SymphonyClientgetAgentUrl in interface SymphonyClientpublic void setAgentUrl(java.lang.String agentUrl)
agentUrl - Agent URLpublic java.lang.String getPodUrl()
SymphonyClientgetPodUrl in interface SymphonyClientpublic void setPodUrl(java.lang.String podUrl)
podUrl - Service URL which can be either the Agent URL or POD URLpublic DataFeedClient getDataFeedClient()
SymphonyClientgetDataFeedClient in interface SymphonyClientpublic MessagesClient getMessagesClient()
SymphonyClientgetMessagesClient in interface SymphonyClientpublic MessageService getMessageService()
SymphonyClientgetMessageService in interface SymphonyClientpublic RoomService getRoomService()
SymphonyClientgetRoomService in interface SymphonyClientRoomServicepublic SymUser getLocalUser()
SymphonyClientgetLocalUser in interface SymphonyClientSymUser User representing the BOT identitypublic void setLocalUser(SymUser localUser)
public ChatService getChatService()
SymphonyClientgetChatService in interface SymphonyClientChatServicepublic PresenceClient getPresenceClient()
SymphonyClientgetPresenceClient in interface SymphonyClientPresenceClientpublic StreamsClient getStreamsClient()
SymphonyClientgetStreamsClient in interface SymphonyClientStreamsClientpublic UsersClient getUsersClient()
SymphonyClientgetUsersClient in interface SymphonyClientUsersClientpublic RoomMembershipClient getRoomMembershipClient()
SymphonyClientgetRoomMembershipClient in interface SymphonyClientRoomMembershipClientpublic AttachmentsClient getAttachmentsClient()
SymphonyClientgetAttachmentsClient in interface SymphonyClientAttachmentsClientpublic ConnectionsClient getConnectionsClient()
SymphonyClientgetConnectionsClient in interface SymphonyClientConnectionsClientpublic ShareClient getShareClient()
SymphonyClientgetShareClient in interface SymphonyClientShareClientpublic javax.ws.rs.client.Client getDefaultHttpClient()
getDefaultHttpClient in interface SymphonyClientpublic void setDefaultHttpClient(javax.ws.rs.client.Client defaultHttpClient)
SymphonyClientsetDefaultHttpClient in interface SymphonyClientdefaultHttpClient - Custom HTTP clientpublic void setCache(SymCache symCache) throws SymCacheException
SymphonyClientCacheTypesetCache in interface SymphonyClientsymCache - A cacheSymCacheException - Exception if cache is unknown.public SymCache getCache(CacheType cacheType)
SymphonyClientCacheTypegetCache in interface SymphonyClientcacheType - The type of cache to returnpublic void shutdown()
SymphonyClientshutdown in interface SymphonyClientpublic javax.ws.rs.client.Client getPodHttpClient()
SymphonyClientgetPodHttpClient in interface SymphonyClientpublic void setPodHttpClient(javax.ws.rs.client.Client podHttpClient)
SymphonyClientsetPodHttpClient in interface SymphonyClientpodHttpClient - HttpClient for PODpublic javax.ws.rs.client.Client getAgentHttpClient()
SymphonyClientgetAgentHttpClient in interface SymphonyClientpublic void setAgentHttpClient(javax.ws.rs.client.Client agentHttpClient)
SymphonyClientsetAgentHttpClient in interface SymphonyClientagentHttpClient - HttpClient for Agentpublic SymphonyApis getSymphonyApis()
SymphonyClientgetSymphonyApis in interface SymphonyClientpublic SymphonyClientConfig getConfig()
SymphonyClientgetConfig in interface SymphonyClientpublic void setConfig(SymphonyClientConfig config)
SymphonyClientsetConfig in interface SymphonyClientconfig - SymphonyClientConfiguration for SJCpublic PresenceService getPresenceService()
getPresenceService in interface SymphonyClient