uk.ac.starlink.plastic
Class BasicApplication

java.lang.Object
  extended byuk.ac.starlink.plastic.BasicApplication
All Implemented Interfaces:
PlasticApplication, PlasticListener

public class BasicApplication
extends Object
implements PlasticApplication

Basic implementation of the PlasticApplication interface. Could serve as a superclass for other concrete implementations.

Since:
14 Jul 2006
Author:
Mark Taylor

Field Summary
 
Fields inherited from interface org.votech.plastic.PlasticListener
CURRENT_VERSION
 
Constructor Summary
BasicApplication(String name)
          Constructor.
 
Method Summary
 String getName()
          Returns the application generic name.
 URI[] getSupportedMessages()
          Returns the messages which the application will support.
 Object perform(URI sender, URI msg, List args)
          Request that the application perform an action based on a message.
 void setDescription(String description)
          Sets the application description text.
 void setIconUrl(String iconUrl)
          Sets the icon URL for the application.
 void setIvorn(String ivorn)
          Sets the IVORN for the application.
 void setVersion(String version)
          Sets the PLASTIC version string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicApplication

public BasicApplication(String name)
Constructor.

Parameters:
name - registered application name
Method Detail

getName

public String getName()
Description copied from interface: PlasticApplication
Returns the application generic name.

Specified by:
getName in interface PlasticApplication
Returns:
name

setDescription

public void setDescription(String description)
Sets the application description text.

Parameters:
description - description text

setVersion

public void setVersion(String version)
Sets the PLASTIC version string. Default is PlasticUtils.PLASTIC_VERSION.

Parameters:
version - plastic version string

setIconUrl

public void setIconUrl(String iconUrl)
Sets the icon URL for the application.

Parameters:
iconUrl - icon URL

setIvorn

public void setIvorn(String ivorn)
Sets the IVORN for the application.

Parameters:
ivorn - IVORN

getSupportedMessages

public URI[] getSupportedMessages()
Description copied from interface: PlasticApplication
Returns the messages which the application will support. An empty array means all messages.

Specified by:
getSupportedMessages in interface PlasticApplication
Returns:
supported message IDs

perform

public Object perform(URI sender,
                      URI msg,
                      List args)
Description copied from interface: PlasticListener
Request that the application perform an action based on a message.

Specified by:
perform in interface PlasticListener
Parameters:
sender - the ID of the originating application.
msg - the URI representing the action.
args - any arguments to pass.
Returns:
any return value of the action.
See Also:
http://plastic.sourceforge.net


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