com.sun.identity.liberty.ws.disco
Class DiscoveryClient

java.lang.Object
  |
  +--com.sun.identity.liberty.ws.disco.DiscoveryClient

public class DiscoveryClient
extends java.lang.Object

The class DiscoveryClient provides methods to send Discovery Service query and modify. Note: Current implementation uses JAXB objects and no wrapper classes are used.


Constructor Summary
DiscoveryClient(BinarySecurityToken token, java.lang.String soapURI, java.lang.String providerID)
          Constructor, connects to Discovery Service using WSS X509 Token.
DiscoveryClient(ResourceOffering resourceOffering, SSOToken ssoToken, java.lang.String providerID)
          Constructor, connects to Discovery Service specified by the resource offering, security mechanism/SOAP endpoint defined in the ResourceOffering will be used.
DiscoveryClient(ResourceOffering resourceOffering, SSOToken ssoToken, java.lang.String providerID, java.util.List assertions)
          Constructor, connects to Discovery Service specified by the resource offering, security mechanism/SOAP endpoint defined in the ResourceOffering will be used.
DiscoveryClient(SecurityAssertion assertion, java.lang.String soapURI, java.lang.String providerID)
          Constructor, connects to Discovery Service using WSS SAML Token.
DiscoveryClient(java.lang.String soapURI, java.lang.String providerID)
          Constructor, connects to Discovery Service without web service security token.
 
Method Summary
 QueryResponse getResourceOffering(java.util.List serviceTypes)
          Queries discovery service for ResourceOffering given list of service types.
 QueryResponse getResourceOffering(Query query)
          Queries discovery service for resource offering
 ModifyResponse modify(Modify modify)
          Modifies discovery resource offering
 void setClientAuthentication(boolean value)
          Sets flag to indicate whether the connection is SSL/TLS with client authentication.
 void setClientCert(java.lang.String certAlias)
          Sets the alias for the client certificate.
 void setProviderID(java.lang.String providerID)
          Sets the provider ID.
 void setResourceID(EncryptedResourceID resourceID)
          Sets the encrypted resource ID to be accessed.
 void setResourceID(java.lang.String resourceID)
          Sets the resource ID to be accessed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscoveryClient

public DiscoveryClient(java.lang.String soapURI,
                       java.lang.String providerID)
Constructor, connects to Discovery Service without web service security token.
Parameters:
soapURI - URI of the SOAP end point for this discovery service instance
providerID - ID of the web service client.

DiscoveryClient

public DiscoveryClient(SecurityAssertion assertion,
                       java.lang.String soapURI,
                       java.lang.String providerID)
Constructor, connects to Discovery Service using WSS SAML Token.
Parameters:
assertion - WSS SAML Token
soapURI - URI of the SOAP end point for this discovery service instance
providerID - ID of the web service client.

DiscoveryClient

public DiscoveryClient(BinarySecurityToken token,
                       java.lang.String soapURI,
                       java.lang.String providerID)
Constructor, connects to Discovery Service using WSS X509 Token.
Parameters:
token - WSS X.509 Certificate Token
soapURI - URI of the SOAP end point for this discovery service instance.
providerID - ID of the web service client.

DiscoveryClient

public DiscoveryClient(ResourceOffering resourceOffering,
                       SSOToken ssoToken,
                       java.lang.String providerID)
Constructor, connects to Discovery Service specified by the resource offering, security mechanism/SOAP endpoint defined in the ResourceOffering will be used.
Parameters:
resourceOffering - resource offering for this discovery service instance
ssoToken - SSOToken of the WSC
providerID - ID of the web service client.

DiscoveryClient

public DiscoveryClient(ResourceOffering resourceOffering,
                       SSOToken ssoToken,
                       java.lang.String providerID,
                       java.util.List assertions)
Constructor, connects to Discovery Service specified by the resource offering, security mechanism/SOAP endpoint defined in the ResourceOffering will be used.
Parameters:
resourceOffering - resource offering for this discovery service instance
ssoToken - SSOToken of the WSC
providerID - ID of the web service client.
assertions - List of assertions.
Method Detail

setClientCert

public void setClientCert(java.lang.String certAlias)
Sets the alias for the client certificate. If none is set, a default client certificate will be used.
Parameters:
certAlias - certificate alias name

setClientAuthentication

public void setClientAuthentication(boolean value)
Sets flag to indicate whether the connection is SSL/TLS with client authentication. When this flag is set to true, the message will not be signed according to the spec. If you want to sign the message always, do not set this flag to true, even when the connection is SSL/TLS with client authentication.
Parameters:
value - The flag value to be set

setResourceID

public void setResourceID(java.lang.String resourceID)
Sets the resource ID to be accessed
Parameters:
resourceID - resource ID

setResourceID

public void setResourceID(EncryptedResourceID resourceID)
Sets the encrypted resource ID to be accessed.
Parameters:
resourceID - encrypted resource ID.

setProviderID

public void setProviderID(java.lang.String providerID)
Sets the provider ID.
Parameters:
providerID - ID of the web service client.

getResourceOffering

public QueryResponse getResourceOffering(java.util.List serviceTypes)
                                  throws DiscoveryException
Queries discovery service for ResourceOffering given list of service types.
Parameters:
serviceTypes - List of serviceTypes as java.lang.String to be queried
Returns:
Query response Element corresponding to the query
Throws:
DiscoveryException - if error occurs

getResourceOffering

public QueryResponse getResourceOffering(Query query)
                                  throws DiscoveryException
Queries discovery service for resource offering
Parameters:
query - discovery query object
Returns:
Query response Element corresponding to the query
Throws:
DiscoveryException - if error occurs

modify

public ModifyResponse modify(Modify modify)
                      throws DiscoveryException
Modifies discovery resource offering
Parameters:
modify - List of Modify object
Returns:
List of ModifyResponse object
Throws:
DiscoveryException - if error occurs


Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.