Class SecurityManagerEventClient
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.securitymanager.client.SecurityManagerEventClient
-
- All Implemented Interfaces:
SecurityManagerEventInterface
public class SecurityManagerEventClient extends Object implements SecurityManagerEventInterface
SecurityManagerEventClient provides the implementation to manage the interaction with the server to set up a listener to support the receipt of inbound events from the Security Manager OMAS Out Topic.
-
-
Constructor Summary
Constructors Constructor Description SecurityManagerEventClient(String serverName, String serverPlatformURLRoot, String callerId)Create a new client with no authentication embedded in the HTTP request.SecurityManagerEventClient(String serverName, String serverPlatformURLRoot, String userId, String password, String callerId)Create a new client that passes userId and password in each HTTP request.SecurityManagerEventClient(String serverName, String serverPlatformURLRoot, OCFRESTClient restClient, int maxPageSize, AuditLog auditLog, String callerId)Create a new client that is to be used within an OMAG Server.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetConfigurationServerName()Return the name of the server where configuration is supposed to be stored.voidregisterListener(String userId, SecurityManagerEventListener listener)Register a listener object that will be passed each of the events published by the Security Manager OMAS.
-
-
-
Constructor Detail
-
SecurityManagerEventClient
public SecurityManagerEventClient(String serverName, String serverPlatformURLRoot, String callerId) throws InvalidParameterException
Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serverscallerId- unique identifier of the caller- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
SecurityManagerEventClient
public SecurityManagerEventClient(String serverName, String serverPlatformURLRoot, String userId, String password, String callerId) throws InvalidParameterException
Create a new client that passes 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:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requestscallerId- unique identifier of the caller- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
SecurityManagerEventClient
public SecurityManagerEventClient(String serverName, String serverPlatformURLRoot, OCFRESTClient restClient, int maxPageSize, AuditLog auditLog, String callerId) throws InvalidParameterException
Create a new client that is to be used within an OMAG Server.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversrestClient- pre-initialized REST clientmaxPageSize- pre-initialized parameter limitauditLog- logging destinationcallerId- unique identifier of the caller- Throws:
InvalidParameterException- there is a problem with the information about the remote OMAS
-
-
Method Detail
-
getConfigurationServerName
public String getConfigurationServerName()
Return the name of the server where configuration is supposed to be stored.- Returns:
- server name
-
registerListener
public void registerListener(String userId, SecurityManagerEventListener listener) throws InvalidParameterException, ConnectionCheckedException, ConnectorCheckedException, PropertyServerException, UserNotAuthorizedException
Register a listener object that will be passed each of the events published by the Security Manager OMAS.- Specified by:
registerListenerin interfaceSecurityManagerEventInterface- Parameters:
userId- calling userlistener- listener object- Throws:
InvalidParameterException- one of the parameters is null or invalid.ConnectionCheckedException- there are errors in the configuration of the connection which is preventing the creation of a connector.ConnectorCheckedException- there are errors in the initialization of the connector.PropertyServerException- there is a problem retrieving information from the property server(s).UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
-