uk.ac.soton.itinnovation.grid.utils
Interface Transport

All Known Implementing Classes:
AbstractTransport, AxisTransport, StressTestHelpers.TestAxisTransport

public interface Transport

A Transport is used to make calls on a remote GRIA service. Normally, you don't want to use this interface directly; instead, use Conversation objects, which use this interface internally.


Method Summary
 void addInvocationListener(InvocationListener invocationListener)
          Add a listener to be notified of all remote operations.
 Document fetchWSDL(URL url, X509Certificate expectedCertificate)
          Download and parse a WSDL file.
 CertificateTrustValidator getCertificateTrustValidator()
          Decides whether to trust a server's certificate.
 IdentityProvider getIdentityProvider()
          Returns the configured identity provider.
 X509Certificate getIssuerCert()
          Deprecated. use getIdentityProvider() instead
 KeyStore getKeyStore()
          Deprecated. use getIdentityProvider() instead
 Key getPrivateKey()
          Deprecated. use getIdentityProvider() instead
 X509Certificate getSubjectCert()
          Deprecated. use getIdentityProvider() instead
 org.apache.commons.httpclient.methods.GetMethod getURL(URL url, org.apache.commons.httpclient.Header[] extraHeaders)
          Read a remote HTTP resource.
 Object invoke(org.apache.axis.message.addressing.EndpointReferenceType target, RemoteMethod method, Object[] argValues)
          Invoke a SOAP method on a remote server.
 InputStream openURL(URL url)
          Deprecated. see getURL(java.net.URL, org.apache.commons.httpclient.Header[])
 void putURL(URL url, org.apache.commons.httpclient.methods.RequestEntity entity, org.apache.commons.httpclient.Header[] extraHeaders)
          Upload some data using an HTTP PUT.
 void removeInvocationListener(InvocationListener invocationListener)
          Remove a listener added with addInvocationListener(uk.ac.soton.ecs.iam.grid.comms.client.helpers.InvocationListener).
 void setIdentityProvider(IdentityProvider idp)
          Set the configured identity provider.
 

Method Detail

invoke

Object invoke(org.apache.axis.message.addressing.EndpointReferenceType target,
              RemoteMethod method,
              Object[] argValues)
              throws RemoteException
Invoke a SOAP method on a remote server.

The clientRef, serviceProviderRef and version fields of the request are filled in automatically.

Parameters:
target - the resource to be invoked
method - the operation being invoked
argValues - the values of the input arguments
Returns:
the value returned by the remote call, or null if return type is void. If an attachment is returned, the value will be a DataHandler. If documentStyle is true, the result is the unprocessed Document from the response message.
Throws:
RemoteException
Since:
5.3

getSubjectCert

@Deprecated
X509Certificate getSubjectCert()
Deprecated. use getIdentityProvider() instead

Return the certificate we use for signing messages.


getIssuerCert

@Deprecated
X509Certificate getIssuerCert()
Deprecated. use getIdentityProvider() instead

Return the certificate of the issuer of the certificate we use for signing messages.


getKeyStore

@Deprecated
KeyStore getKeyStore()
Deprecated. use getIdentityProvider() instead

Get the keystore, which contains a single private key.

Returns:
the keystore

getPrivateKey

@Deprecated
Key getPrivateKey()
Deprecated. use getIdentityProvider() instead

Get the private key from the keystore.


getIdentityProvider

IdentityProvider getIdentityProvider()
Returns the configured identity provider.

Since:
5.3

setIdentityProvider

void setIdentityProvider(IdentityProvider idp)
Set the configured identity provider.

Since:
5.3

getURL

org.apache.commons.httpclient.methods.GetMethod getURL(URL url,
                                                       org.apache.commons.httpclient.Header[] extraHeaders)
                                                       throws IOException
Read a remote HTTP resource. You should call HttpMethodBase.getResponseBodyAsStream() to get a stream with the data. Make sure you call HttpMethodBase.releaseConnection() when done.

Parameters:
url - the URL of the resource
extraHeaders - extra HTTP headers to include (can be null for the empty list)
Returns:
an open GetMethod which has returned successfully
Throws:
IOException

putURL

void putURL(URL url,
            org.apache.commons.httpclient.methods.RequestEntity entity,
            org.apache.commons.httpclient.Header[] extraHeaders)
            throws IOException
Upload some data using an HTTP PUT.

Parameters:
url - the URL of the resource to overwrite
entity - the data to be uploaded
extraHeaders - extra HTTP headers to include (can be null for the empty list)
Throws:
IOException

openURL

@Deprecated
InputStream openURL(URL url)
                    throws IOException
Deprecated. see getURL(java.net.URL, org.apache.commons.httpclient.Header[])

Fetch 'url' using the Apache commons httpclient, using our configured keystore and proxy settings. Warning: this method downloads the entire result into memory before returning, since it needs to close the connection.

Parameters:
url - the URL of the HTTP or HTTPS resource
Returns:
InputStream the response data stream (excuding headers)
Throws:
IOException

fetchWSDL

Document fetchWSDL(URL url,
                   X509Certificate expectedCertificate)
                   throws IOException,
                          SAXException,
                          javax.wsdl.WSDLException
Download and parse a WSDL file.

Parameters:
url - the URL of the WSDL file
expectedCertificate - for https connections, the SSL certificate of the server (if known)
Returns:
a WSDL document
Throws:
IOException
SAXException
javax.wsdl.WSDLException

getCertificateTrustValidator

CertificateTrustValidator getCertificateTrustValidator()
Decides whether to trust a server's certificate. When using https, this is called to check the SSL certificate.


addInvocationListener

void addInvocationListener(InvocationListener invocationListener)
Add a listener to be notified of all remote operations.


removeInvocationListener

void removeInvocationListener(InvocationListener invocationListener)
Remove a listener added with addInvocationListener(uk.ac.soton.ecs.iam.grid.comms.client.helpers.InvocationListener).



Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.