public class DiscoveryMgtUtils extends Object
| Constructor and Description |
|---|
DiscoveryMgtUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addDiscoveryProxy(DiscoveryProxyDetails pd,
org.wso2.carbon.registry.api.Registry registry)
Add a new WS-Discovery proxy configuration.
|
static boolean |
discoveryProxyExists(String name,
org.wso2.carbon.registry.api.Registry registry)
Check whether the named WS-D proxy configuration exists in the registry
|
static org.apache.neethi.Policy |
getClientSecurityPolicy(org.wso2.carbon.registry.api.Registry registry)
Get the client side security policy for the remote discovery proxy.
|
static org.apache.axis2.description.Parameter |
getDiscoveryParam(org.apache.axis2.engine.AxisConfiguration axisConfig) |
static DiscoveryProxyDetails[] |
getDiscoveryProxies(org.wso2.carbon.registry.api.Registry registry)
Returns all existing WS-D proxy configurations
|
static DiscoveryProxyDetails |
getDiscoveryProxy(String name,
org.wso2.carbon.registry.api.Registry registry)
Get the named WS-D proxy configuration
|
static String |
getDiscoveryProxyURL(org.apache.axis2.engine.AxisConfiguration axisConfig)
Get the URL of the remote WS-Discovery proxy.
|
static String |
getExistingServiceIdOrUpdate(String name,
String uniqueId,
org.wso2.carbon.registry.api.Registry registry)
Get the previously assigned unique ID of the given service.
|
static TargetServiceDetails |
getServiceDetails(TargetService service)
Construct a target service description using the given TargetService instance
|
static boolean |
isServiceDiscoveryEnabled(org.apache.axis2.engine.AxisConfiguration axisConfig)
Check whether service discovery is enabled in the configuration.
|
static void |
persistPublisherConfiguration(String proxyURL,
boolean enabled,
org.wso2.carbon.registry.api.Registry registry)
Save the WS-Discovery service publisher configuration to the registry.
|
static TargetService[] |
probeDiscoveryProxy(String name,
ProbeDetails pd,
org.wso2.carbon.registry.api.Registry registry)
Probe the specified WS-D proxy to obtain target service details
|
static void |
removeDiscoveryProxy(String name,
org.wso2.carbon.registry.api.Registry registry)
Remove the named WS-D proxy configuration from the registry
|
static TargetService |
resolveService(String name,
String id,
org.wso2.carbon.registry.api.Registry registry)
Resolve the specified service ID against the given proxy
|
public static void addDiscoveryProxy(DiscoveryProxyDetails pd, org.wso2.carbon.registry.api.Registry registry) throws DiscoveryException, org.wso2.carbon.registry.api.RegistryException
pd - WS-Discovery proxy descriptionregistry - Configuration registry where information should be savedDiscoveryException - if the proxy description is invalidorg.wso2.carbon.registry.api.RegistryException - if an error occurs while accessing the registrypublic static String getExistingServiceIdOrUpdate(String name, String uniqueId, org.wso2.carbon.registry.api.Registry registry) throws DiscoveryException, org.wso2.carbon.registry.api.RegistryException
name - Name of the serviceuniqueId - Unique ID to be assigned in case an ID is not specified alreadyregistry - Configuration registry where service ID list is storedDiscoveryException - if the registry is not availableorg.wso2.carbon.registry.api.RegistryException - if an error occurs while accessing the registrypublic static void removeDiscoveryProxy(String name, org.wso2.carbon.registry.api.Registry registry) throws DiscoveryException, org.wso2.carbon.registry.api.RegistryException
name - Name of the proxy configuration to be removedregistry - Configuration registry where proxy information is savedDiscoveryException - if the named configuration does not existorg.wso2.carbon.registry.api.RegistryException - if an error occurs while accessing the registrypublic static DiscoveryProxyDetails getDiscoveryProxy(String name, org.wso2.carbon.registry.api.Registry registry) throws DiscoveryException, org.wso2.carbon.registry.api.RegistryException
name - Name of the proxy configurationregistry - Configuration registry where proxy information is savedDiscoveryException - If the registry is unavailableorg.wso2.carbon.registry.api.RegistryException - If an error occurs while accessing the registrypublic static DiscoveryProxyDetails[] getDiscoveryProxies(org.wso2.carbon.registry.api.Registry registry) throws DiscoveryException, org.wso2.carbon.registry.api.RegistryException
registry - Configuration registry where proxy information is savedDiscoveryException - if the registry is unavailableorg.wso2.carbon.registry.api.RegistryException - if an error occurs while accessing the registrypublic static boolean discoveryProxyExists(String name, org.wso2.carbon.registry.api.Registry registry) throws DiscoveryException, org.wso2.carbon.registry.api.RegistryException
name - The name of the proxy to be testedregistry - Configuration registry where proxy information is savedDiscoveryException - if the registry is unavailableorg.wso2.carbon.registry.api.RegistryException - if an error occurs while accessing the registrypublic static TargetService[] probeDiscoveryProxy(String name, ProbeDetails pd, org.wso2.carbon.registry.api.Registry registry) throws DiscoveryException, org.wso2.carbon.registry.api.RegistryException
name - Name of the proxy to be queriedpd - Probe descriptionregistry - Configuration registry where proxy information is savedDiscoveryException - if the proxy configuration is invalid or the proxy is unavailableorg.wso2.carbon.registry.api.RegistryException - if an error occurs while accessing the registrypublic static TargetService resolveService(String name, String id, org.wso2.carbon.registry.api.Registry registry) throws DiscoveryException, org.wso2.carbon.registry.api.RegistryException
name - Name of the proxy to be queriedid - Service ID to be resolvedregistry - Configuration registry where proxy information is savedDiscoveryException - if the proxy configuration is invalid or the proxy is unavailableorg.wso2.carbon.registry.api.RegistryException - if an error occurs while accessing the registrypublic static boolean isServiceDiscoveryEnabled(org.apache.axis2.engine.AxisConfiguration axisConfig)
throws org.wso2.carbon.registry.api.RegistryException
axisConfig - AxisConfigurationorg.wso2.carbon.registry.api.RegistryException - if an error occurs while accessing the registrypublic static String getDiscoveryProxyURL(org.apache.axis2.engine.AxisConfiguration axisConfig) throws org.wso2.carbon.registry.api.RegistryException
axisConfig - AxisConfiguration instanceorg.wso2.carbon.registry.api.RegistryException - on errorpublic static org.apache.axis2.description.Parameter getDiscoveryParam(org.apache.axis2.engine.AxisConfiguration axisConfig)
public static void persistPublisherConfiguration(String proxyURL, boolean enabled, org.wso2.carbon.registry.api.Registry registry) throws org.wso2.carbon.registry.api.RegistryException
proxyURL - URL of the discovery proxyenabled - true if the publisher is enabled and false otherwiseregistry - Configuration registryorg.wso2.carbon.registry.api.RegistryException - on errorpublic static org.apache.neethi.Policy getClientSecurityPolicy(org.wso2.carbon.registry.api.Registry registry)
throws org.wso2.carbon.registry.api.RegistryException,
XMLStreamException
registry - Configuration registryorg.wso2.carbon.registry.api.RegistryException - If the registry cannot be accessedXMLStreamException - If the policy XML cannot be parsedpublic static TargetServiceDetails getServiceDetails(TargetService service)
service - the TargetService object - must not be nullCopyright © 2019 WSO2. All rights reserved.