uk.ac.starlink.ttools.mode
Class PlasticMode

java.lang.Object
  extended by uk.ac.starlink.ttools.mode.PlasticMode
All Implemented Interfaces:
ProcessingMode

public class PlasticMode
extends Object
implements ProcessingMode

Processing mode for broadcasting the table for loading using the PLASTIC tool interop protocol.

Since:
8 Feb 2006
Author:
Mark Taylor
See Also:
PLASTIC

Field Summary
static URI MSG_BYTEXT
          Message ID for load by passing VOTable text as a string argument.
static URI MSG_BYURL
          Message ID for load by passing VOTable URL (temp file) as argument.
 
Constructor Summary
PlasticMode()
           
 
Method Summary
static void broadcast(StarTable table, URI msg, PlasticHubListener hub, URI plasticId, StoragePolicy policy, String client, PrintStream out)
          Broadcasts a table to PLASTIC listeners by sending it to the hub as a VOTable.
 TableConsumer createConsumer(Environment env)
          Creates a TableConsumer, deriving any additional required configuration from a given environment.
 Parameter[] getAssociatedParameters()
          Returns a list of any parameters which are associated with this mode.
 String getDescription()
          Returns a textual description of this processing mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG_BYTEXT

public static final URI MSG_BYTEXT
Message ID for load by passing VOTable text as a string argument.


MSG_BYURL

public static final URI MSG_BYURL
Message ID for load by passing VOTable URL (temp file) as argument.

Constructor Detail

PlasticMode

public PlasticMode()
Method Detail

getDescription

public String getDescription()
Description copied from interface: ProcessingMode
Returns a textual description of this processing mode. This will be included in the user document so should be in XML.

Specified by:
getDescription in interface ProcessingMode
Returns:
textual description of this mode

getAssociatedParameters

public Parameter[] getAssociatedParameters()
Description copied from interface: ProcessingMode
Returns a list of any parameters which are associated with this mode.

Specified by:
getAssociatedParameters in interface ProcessingMode
Returns:
parameter list

createConsumer

public TableConsumer createConsumer(Environment env)
                             throws TaskException
Description copied from interface: ProcessingMode
Creates a TableConsumer, deriving any additional required configuration from a given environment.

Specified by:
createConsumer in interface ProcessingMode
Parameters:
env - execution environment
Throws:
TaskException

broadcast

public static void broadcast(StarTable table,
                             URI msg,
                             PlasticHubListener hub,
                             URI plasticId,
                             StoragePolicy policy,
                             String client,
                             PrintStream out)
                      throws IOException
Broadcasts a table to PLASTIC listeners by sending it to the hub as a VOTable.

Parameters:
table - table to broadcast
msg - PLASTIC message key which defines how the transport will take place (one of MSG_BYTEXT, MSG_BYURL or null)
hub - plastic hub object
plasticId - plastic identifier for this client
policy - storage policy
client - application name of sole target for broadcast, or null for all
out - output stream to the environment (may be null)
Throws:
IOException


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.