uk.org.ogsadai.client
Class Client

java.lang.Object
  |
  +--uk.org.ogsadai.client.Client

public class Client
extends java.lang.Object

A simple client for OGSA-DAI data services and configurable data services.

The client has the following syntax:

java uk.org.ogsadai.client.Client
    -u DATA-SERVICE-URI
    [-k DATA-SERVICE-RESOURCE-ID ACTION]
    [-mls CLIENT_SECURITY_DESCRIPTOR]
    [-tls [encrypt]]

where action is one of:

If no data service resource ID is provided then the service version and a list of the data service resources it exposes are displayed.

The -mls argument specifies that message level security should be used and the CLIENT_SECURITY_DESCRIPTOR value specifies the name of the Globus client security descriptor to use. This option will only work with WSRF services.

The -tls flag specifies that transport level security should be used. To use transport level security you must specify the https protocol in the DATA-SERVICE-URI. By default transport level security will provide data integrity to also encrypt the data you include encrypt after the -tls argument. Transport level security will only work with WSRF services.

Author:
The OGSA-DAI Project Team.

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement.
private static java.lang.String mAction
          Action.
private static boolean mApplyMessageLevelSecurity
          Have we to apply message level security?
private static boolean mApplyTransportLevelEncryption
          Have we to apply transport level security encryption?
private static boolean mApplyTransportLevelSecurity
          Have we to apply transport level security?
private static java.lang.String mClientSecurityDescriptor
          Message level security security descriptor file name.
private static java.lang.String mID
          Data service resource name.
private static java.lang.String mProperty
          Property name.
private static java.lang.String mURL
          Data service URL.
 
Constructor Summary
Client()
           
 
Method Summary
private static void displayProperty(Property property)
          Display the name and value of a property.
private static void displaySyntax()
          Display the client syntax.
static void exitClient(java.lang.Throwable e)
          Display an exception.
private static Property[] getProperties(ConfigurableDataService service, java.lang.String[] properties)
          Contact a service and return multiple properties.
private static Property getProperty(ConfigurableDataService service, java.lang.String property)
          Contact a service and return a single property.
private static org.w3c.dom.Document loadPerformDoc()
          Load a perform document into a DOM object.
static void main(java.lang.String[] args)
          Invoke the client.
private static void parse(java.lang.String[] args)
          Extract command-line arguments into local variables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement.

See Also:
Constant Field Values

mURL

private static java.lang.String mURL
Data service URL.


mID

private static java.lang.String mID
Data service resource name.


mAction

private static java.lang.String mAction
Action.


mProperty

private static java.lang.String mProperty
Property name.


mApplyMessageLevelSecurity

private static boolean mApplyMessageLevelSecurity
Have we to apply message level security?


mClientSecurityDescriptor

private static java.lang.String mClientSecurityDescriptor
Message level security security descriptor file name.


mApplyTransportLevelSecurity

private static boolean mApplyTransportLevelSecurity
Have we to apply transport level security?


mApplyTransportLevelEncryption

private static boolean mApplyTransportLevelEncryption
Have we to apply transport level security encryption?

Constructor Detail

Client

public Client()
Method Detail

main

public static void main(java.lang.String[] args)
Invoke the client.

Parameters:
args - Arguments to the client as described above.

getProperty

private static Property getProperty(ConfigurableDataService service,
                                    java.lang.String property)
                             throws java.lang.Exception
Contact a service and return a single property.

Parameters:
service - Service stub
property - Property name as a string.
Returns:
property
Throws:
java.lang.Exception - If any problems occur

getProperties

private static Property[] getProperties(ConfigurableDataService service,
                                        java.lang.String[] properties)
                                 throws java.lang.Exception
Contact a service and return multiple properties.

Parameters:
service - Service stub
properties - Property names
Returns:
properties;
Throws:
java.lang.Exception - If any problems occur

displayProperty

private static void displayProperty(Property property)
Display the name and value of a property.

Parameters:
property - Property to display

parse

private static void parse(java.lang.String[] args)
Extract command-line arguments into local variables.

This method will exit if there is a problem, displaying the command-line syntax.

Parameters:
args - Command line arguments.

displaySyntax

private static void displaySyntax()
Display the client syntax.


exitClient

public static void exitClient(java.lang.Throwable e)
Display an exception.

Parameters:
e - Exception to display stack trace for. If null then no trace is printed.

loadPerformDoc

private static org.w3c.dom.Document loadPerformDoc()
Load a perform document into a DOM object.

This method will exit if there is a problem.

Returns:
DOM representation of perform document.