uk.ac.starlink.plastic
Class PlasticRequest

java.lang.Object
  extended byuk.ac.starlink.plastic.PlasticRequest

public class PlasticRequest
extends Object

PLASTIC client designed for use from the command line which can execute a request.

Since:
17 Feb 2006
Author:
Mark Taylor

Constructor Summary
PlasticRequest()
           
 
Method Summary
static void main(String[] args)
          Executes a simple PLASTIC request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlasticRequest

public PlasticRequest()
Method Detail

main

public static void main(String[] args)
                 throws IOException
Executes a simple PLASTIC request. This method registers with the hub (if there is one), executes a request, and unregisters again. If the request is synchronous, then the results are written to standard output.

Usage

    request [flags] messageId [args ...]
 
The args are turned from strings into typed values in an ad hoc way - things that look like doubles are turned into Doubles, things that look like integers are turned into Integers, and the rest are Strings. You can surround a literal in quotes to force stringiness. Lists can be generated using the construction "(item1, item2, ...)". This application does not claim to make it possible to execute requests of arbitrary complexity from the command line.

If the -targetName or -targetId flags are specified, then the request will only be sent to the listener(s) so identified. Otherwise, it will be sent to all registered listeners.

Flags

-sync
Force synchronous operation (the default).
-async
Force asynchronous operation.
-targetName name
Specifies the application name of the app to which the request will be delivered. May be given more than once.
-targetId id
Specifies the application ID of the app to which the request will be delivered. May be given more than once.
-regName name
Specify the generic application name by which the reqestor registers with the hub.
-clientId id
Specifies the ID of the client which claims to be sending the request. In this case the request will not register with the hub prior to making the request. You may not be making a legal, decent, honest and truthful request if you use this flag.
--
Anything after this is not a flag, even if it looks like one.

Throws:
IOException


Copyright © 2006 \\ CLRC: Central Laboratory of the Research Councils. All Rights Reserved.