Class ViewServiceClientMap<B>
java.lang.Object
org.odpi.openmetadata.commonservices.multitenant.ViewServiceClientMap<B>
Manages a map from view service URL marker to client. This is used by the generic view
services to ensure the request is mapped to the correct access service in the metadata access server.
-
Constructor Summary
ConstructorsConstructorDescriptionViewServiceClientMap
(Class<B> beanClass, String localServerName, String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, List<ViewServiceConfig> activeViewServices, String serviceName, int maxPageSize) Create new clients that pass userId and password in each HTTP request.ViewServiceClientMap
(Class<B> beanClass, String localServerName, String serverName, String serverPlatformURLRoot, AuditLog auditLog, List<ViewServiceConfig> activeViewServices, String serviceName, int maxPageSize) Create new clients with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve/create the client for the requested view service.protected void
handleInvalidBeanClass
(String beanClassName, Exception error, String methodName) Throw an exception to indicate that one of the update methods has not been implemented by an OMAS.
-
Constructor Details
-
ViewServiceClientMap
public ViewServiceClientMap(Class<B> beanClass, String localServerName, String serverName, String serverPlatformURLRoot, AuditLog auditLog, List<ViewServiceConfig> activeViewServices, String serviceName, int maxPageSize) Create new clients with no authentication embedded in the HTTP request.- Parameters:
beanClass
- name of the class to createlocalServerName
- name of this server (view server)serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesauditLog
- logging destinationserviceName
- local service namemaxPageSize
- maximum number of results supported by this server
-
ViewServiceClientMap
public ViewServiceClientMap(Class<B> beanClass, String localServerName, String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, List<ViewServiceConfig> activeViewServices, String serviceName, int maxPageSize) Create new clients that pass userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
beanClass
- name of the class to createlocalServerName
- name of this server (view server)serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requestsmaxPageSize
- maximum number of results supported by this serveractiveViewServices
- which view services are runningserviceName
- local service nameauditLog
- logging destination
-
-
Method Details
-
getClient
public B getClient(String viewServiceURLMarker, String methodName) throws InvalidParameterException, PropertyServerException Retrieve/create the client for the requested view service.- Parameters:
viewServiceURLMarker
- url marker from the incoming requestmethodName
- calling method- Returns:
- requested client
- Throws:
InvalidParameterException
- problem initializing the clientPropertyServerException
- problem with the client class
-
handleInvalidBeanClass
protected void handleInvalidBeanClass(String beanClassName, Exception error, String methodName) throws PropertyServerException Throw an exception to indicate that one of the update methods has not been implemented by an OMAS.- Parameters:
beanClassName
- class name of beanerror
- exception generated when the new bean is createdmethodName
- method that is missing- Throws:
PropertyServerException
- there is a problem in the use of the generic handlers because the converter has been configured with a type of bean that is not a known class
-