Class ConnectorFactory
java.lang.Object
de.fraunhofer.iese.mydata.component.connector.ConnectorFactory
Helper class for establishing connections to the MYDATA components by using a URI. It uses
reflection to determine the type of the connector needed for a certain protocol.
-
Constructor Summary
ConstructorDescriptionConstructor without any additional packageNames to look for Connector classes.ConnectorFactory
(Set<String> additionalPackageNames) Constructor with the ability to specify additional packageNames where we should look for Connector classes. -
Method Summary
Modifier and TypeMethodDescriptiongetBasicManagementService
(BasicManagementServiceComponentInformation component, String preferredConnectorType) Tries to establish a connection to a PMP client by using the passed url variable.getManagementService
(URI url) Gets the management service.getManagementService
(URI url, OAuthCredentials oAuthCredentials) Tries to establish a connection to a PMP server by using the passed url variable.getPdp
(PdpComponentInformation component, Authentication credentials) Tries to establish a connection to a PDP by using the passed url variable.getPdp
(PdpComponentInformation component, String preferredConnectorType, Map<String, Authentication> protocolToAuthentication) Tries to establish a connection to a PDP by using the passed url variable.getPdp
(PdpComponentInformation component, String preferredConnectorType, Map<String, Authentication> protocolToAuthentication, String[] activeprofiles) Tries to establish a connection to a PDP by using the passed url variable.Tries to establish a connection to a PDP by using the passed url variable.getPdp
(URI url, Authentication credentials) Tries to establish a connection to a PDP by using the passed url variable.getPip
(PipComponentInformation component, String preferredConnectorType) Tries to establish a connection to a PIP by using the passed url variable.Tries to establish a connection to a PIP by using the passed url variable.getPmpClient
(URI url) Tries to establish a connection to a PMP client by using the passed url variable.getPmpClient
(URI url, OAuthCredentials oAuthCredentials) Tries to establish a connection to a PMP client by using the passed url variable.getPmpServer
(URI url) Tries to establish a connection to a PMP server by using the passed url variable.getPxp
(PxpComponentInformation component, String preferredConnectorType) Tries to establish a connection to a PXP by using the passed url variable.Tries to establish a connection to a PXP by using the passed url variable.
-
Constructor Details
-
ConnectorFactory
public ConnectorFactory()Constructor without any additional packageNames to look for Connector classes.- See Also:
-
ConnectorFactory
Constructor with the ability to specify additional packageNames where we should look for Connector classes.- Parameters:
additionalPackageNames
- set of package names
-
-
Method Details
-
getPdp
Tries to establish a connection to a PDP by using the passed url variable.- Parameters:
component
- The Component containing the URL used to connect to the component, like rmi://localhost:1111/pdpRmicredentials
- the protocol to authentication- Returns:
- A connector suitable for the specified protocol, null in case of an error
-
getPdp
public IPolicyDecisionPoint getPdp(PdpComponentInformation component, String preferredConnectorType, Map<String, Authentication> protocolToAuthentication) Tries to establish a connection to a PDP by using the passed url variable.- Parameters:
component
- The Component containing the URL used to connect to the component, like rmi://localhost:1111/pdpRmipreferredConnectorType
- The preferred connector type (optional). If null, if the preferredConnectorType string is not found or if there is only one url, the connector will be selected according to the priorities list. This parameter is not case sensitive.protocolToAuthentication
- the protocol to authentication- Returns:
- A connector suitable for the specified protocol, null in case of an error
-
getPdp
public IPolicyDecisionPoint getPdp(PdpComponentInformation component, String preferredConnectorType, Map<String, Authentication> protocolToAuthentication, String[] activeprofiles) Tries to establish a connection to a PDP by using the passed url variable.- Parameters:
component
- The Component containing the URL used to connect to the component, like rmi://localhost:1111/pdpRmipreferredConnectorType
- The preferred connector type (optional). If null, if the preferredConnectorType string is not found or if there is only one url, the connector will be selected according to the priorities list. This parameter is not case sensitive.protocolToAuthentication
- the protocol to authenticationactiveprofiles
- the activeprofiles- Returns:
- A connector suitable for the specified protocol, null in case of an error
-
getPdp
Tries to establish a connection to a PDP by using the passed url variable.- Parameters:
url
- The URL used to connect to the component, like rmi://localhost:1111/pdpRmi- Returns:
- A connector suitable for the specified protocol, null in case of an error
-
getPdp
Tries to establish a connection to a PDP by using the passed url variable.- Parameters:
url
- The URL used to connect to the component, like rmi://localhost:1111/pdpRmicredentials
- API Key (Oauth)- Returns:
- A connector suitable for the specified protocol, null in case of an error
-
getPip
public IPolicyInformationPoint getPip(PipComponentInformation component, String preferredConnectorType) Tries to establish a connection to a PIP by using the passed url variable.- Parameters:
component
- The Component containing the URL used to connect to the component, like rmi://localhost:1111/pipRmipreferredConnectorType
- The preferred connector type (optional). If null, if the preferredConnectorType string is not found or if there is only one url, the connector will be selected according to the priorities list. This parameter is not case sensitive.- Returns:
- A connector suitable for the specified protocol, null in case of an error
-
getPip
Tries to establish a connection to a PIP by using the passed url variable.- Parameters:
url
- The URL used to connect to the component, like rmi://localhost:1111/pipRmi- Returns:
- A connector suitable for the specified protocol, null in case of an error
-
getBasicManagementService
public IBasicManagementService getBasicManagementService(BasicManagementServiceComponentInformation component, String preferredConnectorType) Tries to establish a connection to a PMP client by using the passed url variable.- Parameters:
component
- The Component containing the URL used to connect to the component, like rmi://localhost:1111/pmpRmipreferredConnectorType
- The preferred connector type (optional). If null, if the preferredConnectorType string is not found or if there is only one url, the connector will be selected according to the priorities list. This parameter is not case sensitive.- Returns:
- A connector suitable for the specified protocol, null in case of an error
-
getPmpClient
Tries to establish a connection to a PMP client by using the passed url variable.- Parameters:
url
- The URL used to connect to the component, like rmi://localhost:1111/pmpRmioAuthCredentials
- Credentials to login.- Returns:
- A connector suitable for the specified protocol, null in case of an error
-
getPmpClient
Tries to establish a connection to a PMP client by using the passed url variable.- Parameters:
url
- The URL used to connect to the component, like rmi://localhost:1111/pmpRmi- Returns:
- A connector suitable for the specified protocol, null in case of an error
-
getManagementService
Gets the management service.- Parameters:
url
- the url- Returns:
- the management service
-
getManagementService
Tries to establish a connection to a PMP server by using the passed url variable.- Parameters:
url
- the urloAuthCredentials
- the o auth credentials- Returns:
- A connector suitable for the specified protocol, null in case of an error
-
getPmpServer
Tries to establish a connection to a PMP server by using the passed url variable.- Parameters:
url
- The URL used to connect to the component, like rmi://localhost:1111/pmpRmi- Returns:
- A connector suitable for the specified protocol, null in case of an error
-
getPxp
public IPolicyExecutionPoint getPxp(PxpComponentInformation component, String preferredConnectorType) Tries to establish a connection to a PXP by using the passed url variable.- Parameters:
component
- The Component containing the URL used to connect to the component, like rmi://localhost:1111/pxpRmipreferredConnectorType
- The preferred connector type (optional). If null, if the preferredConnectorType string is not found or if there is only one url, the connector will be selected according to the priorities list. This parameter is not case sensitive.- Returns:
- A connector suitable for the specified protocol, null in case of an error
-
getPxp
Tries to establish a connection to a PXP by using the passed url variable.- Parameters:
url
- The URL used to connect to the component, like rmi://localhost:1111/pxpRmi- Returns:
- A connector suitable for the specified protocol, null in case of an error
-