T - MockOrRestClient classpublic abstract class VitamClientFactory<T extends MockOrRestClient> extends Object implements VitamClientFactoryInterface<T>
VitamClientFactoryInterface.VitamClientType| Modifier and Type | Field and Description |
|---|---|
protected ClientConfiguration |
clientConfiguration |
| Modifier | Constructor and Description |
|---|---|
protected |
VitamClientFactory(ClientConfiguration configuration,
String resourcePath)
Constructor with standard configuration
|
protected |
VitamClientFactory(ClientConfiguration configuration,
String resourcePath,
boolean cacheable)
Constructor with standard configuration
|
protected |
VitamClientFactory(ClientConfiguration configuration,
String resourcePath,
boolean chunkedMode,
boolean cacheable)
Constructor to allow to enable Multipart support or Chunked mode.
|
protected |
VitamClientFactory(ClientConfiguration configuration,
String resourcePath,
javax.ws.rs.client.Client client)
ONLY use this constructor in unit test.
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeResourcePath(String resourcePath)
Change the server resourcePath to use.
|
void |
changeServerPort(int port)
Change the server port to use.
|
protected void |
disableUseAuthorizationFilter() |
protected void |
enableUseAuthorizationFilter() |
ClientConfiguration |
getClientConfiguration() |
Map<VitamRestEasyConfiguration,Object> |
getDefaultConfigCient() |
Map<VitamRestEasyConfiguration,Object> |
getDefaultConfigCient(boolean chunkedMode) |
javax.ws.rs.client.Client |
getHttpClient()
Get the internal Http client
|
javax.ws.rs.client.Client |
getHttpClient(boolean useChunkedMode)
Get the internal Http client according to the chunk mode
|
String |
getResourcePath()
Get the resource path of the server.
|
String |
getServiceUrl()
Get the service URL
|
VitamClientFactoryInterface.VitamClientType |
getVitamClientType() |
VitamThreadPoolExecutor |
getVitamThreadPoolExecutor() |
protected void |
initialisation(ClientConfiguration configuration,
String resourcePath)
Initialize default resource path, service Url, pool manager, ssl configuration and the VitamApacheHttpClient for
RestEasy
|
protected boolean |
isAllowGzipDecoded() |
protected boolean |
isAllowGzipEncoded() |
void |
resume(javax.ws.rs.client.Client client,
boolean chunk)
Reset the client into the Jersey Client pool if possible
|
void |
setGzipdecoded(boolean allowGzipDecoded)
Allow or not the GzipDecoded input from server
|
void |
setGzipEncoded(boolean allowGzipEncoded)
Allow or not the GzipEncoded output from client
|
VitamClientFactory<T> |
setVitamClientType(VitamClientFactoryInterface.VitamClientType vitamClientType) |
void |
shutdown()
Shutdown the global Connection Manager (cannot be restarted yet)
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetClientprotected ClientConfiguration clientConfiguration
protected VitamClientFactory(ClientConfiguration configuration, String resourcePath)
configuration - The client configurationresourcePath - the resource path of the server for the client callsUnsupportedOperationException - HTTPS not implemented yetprotected VitamClientFactory(ClientConfiguration configuration, String resourcePath, boolean cacheable)
configuration - The client configurationresourcePath - the resource path of the server for the client callsUnsupportedOperationException - HTTPS not implemented yetprotected VitamClientFactory(ClientConfiguration configuration, String resourcePath, boolean chunkedMode, boolean cacheable)
configuration - The client configurationresourcePath - the resource path of the server for the client callschunkedMode - one can managed here if the client is in default chunkedMode or notUnsupportedOperationException - HTTPS not implemented yetprotected VitamClientFactory(ClientConfiguration configuration, String resourcePath, javax.ws.rs.client.Client client)
configuration - the client configurationresourcePath - the resource path of the server for the client callsclient - the HTTP client to useUnsupportedOperationException - HTTPS not implemented yetprotected void disableUseAuthorizationFilter()
protected void enableUseAuthorizationFilter()
public void setGzipEncoded(boolean allowGzipEncoded)
allowGzipEncoded - protected boolean isAllowGzipEncoded()
public void setGzipdecoded(boolean allowGzipDecoded)
allowGzipDecoded - protected boolean isAllowGzipDecoded()
protected final void initialisation(ClientConfiguration configuration, String resourcePath)
configuration - resourcePath - public void changeResourcePath(String resourcePath)
VitamClientFactoryInterfacechangeResourcePath in interface VitamClientFactoryInterface<T extends MockOrRestClient>public void changeServerPort(int port)
VitamClientFactoryInterfacechangeServerPort in interface VitamClientFactoryInterface<T extends MockOrRestClient>public VitamClientFactoryInterface.VitamClientType getVitamClientType()
getVitamClientType in interface VitamClientFactoryInterface<T extends MockOrRestClient>VitamClientFactoryInterface.VitamClientTypepublic VitamClientFactory<T> setVitamClientType(VitamClientFactoryInterface.VitamClientType vitamClientType)
setVitamClientType in interface VitamClientFactoryInterface<T extends MockOrRestClient>vitamClientType - to setpublic void resume(javax.ws.rs.client.Client client,
boolean chunk)
VitamClientFactoryInterfaceresume in interface VitamClientFactoryInterface<T extends MockOrRestClient>public javax.ws.rs.client.Client getHttpClient()
VitamClientFactoryInterfacegetHttpClient in interface VitamClientFactoryInterface<T extends MockOrRestClient>public javax.ws.rs.client.Client getHttpClient(boolean useChunkedMode)
VitamClientFactoryInterfacegetHttpClient in interface VitamClientFactoryInterface<T extends MockOrRestClient>public String getResourcePath()
VitamClientFactoryInterfacegetResourcePath in interface VitamClientFactoryInterface<T extends MockOrRestClient>public String getServiceUrl()
VitamClientFactoryInterfacegetServiceUrl in interface VitamClientFactoryInterface<T extends MockOrRestClient>public final ClientConfiguration getClientConfiguration()
getClientConfiguration in interface VitamClientFactoryInterface<T extends MockOrRestClient>public final Map<VitamRestEasyConfiguration,Object> getDefaultConfigCient()
getDefaultConfigCient in interface VitamClientFactoryInterface<T extends MockOrRestClient>public final Map<VitamRestEasyConfiguration,Object> getDefaultConfigCient(boolean chunkedMode)
getDefaultConfigCient in interface VitamClientFactoryInterface<T extends MockOrRestClient>public void shutdown()
shutdown in interface VitamClientFactoryInterface<T extends MockOrRestClient>public VitamThreadPoolExecutor getVitamThreadPoolExecutor()
Copyright © 2018 Vitam. All rights reserved.