de.fzj.unicore.uas
Class UAS

java.lang.Object
  extended by de.fzj.unicore.uas.UAS

public class UAS
extends java.lang.Object

main class, intended to run the UAS as a set of standalone services, including a target system factory, job management etc. It is based on the WSRFlite hosting environment, and uses the XNJS as back-end execution engine.

Author:
schuller

Field Summary
static java.lang.String AUTOREGISTER_WITH_GATEWAY_KEY
          Enable registration with a gateway
static java.lang.String AUTOREGISTER_WITH_GATEWAY_UPDATE_KEY
          update interval for the registration with a gateway in seconds (default = 30 second)
static java.lang.String CUSTOM_SECURITYINHANDLER_KEY
          use this to add a custom XFire handler for security
static java.lang.String CUSTOM_SECURITYOUTHANDLER_KEY
           
static java.lang.String DISABLE_SECURITY_AND_ACCESS_CONTROL
          for unit testing, set this property to "true" to disable security
static java.lang.String DISCOVER_GATEWAY_KEY
          Enable multicast discovery of a gateway
static java.lang.String ENUMERATION
           
static java.lang.String EXTERNAL_REGISTRY_KEY
           
static java.lang.String EXTERNAL_REGISTRY_USE
           
static java.lang.String FTS_BASE
          you need to add the protocol to this one to get the right service e.g.
static java.lang.String GLOBAL_REGISTRY_ADVERTISE
           
static java.lang.String JMS
           
static java.lang.String ON_STARTUP_KEY
          To override the default UAS startup code, set this to a list of names (space-separated) of classes implementing java.lang.Runnable
static java.lang.String ON_STARTUP_SELFTEST
          whether to run a connections check after startup (defaults to "true")
static java.lang.String ON_STARTUP_WAIT_KEY
          To enable waiting for the gateway on startup, set this property to 'true'
static java.lang.String ON_STARTUP_WAITTIME_KEY
          To enable waiting for the gateway on startup, set this property to the max wait time in seconds default: 120
static java.lang.String REG
           
static java.lang.String REGENTRY
           
static java.lang.String REGISTRY_AUTODISCOVER
           
static java.lang.String RESERVATIONS
           
static java.lang.String SMF
           
static java.lang.String SMS
           
static java.lang.String SMS_PROTOCOLS
          Property defining the protocols supported by the SMS
This is a list of String-separated protocols, e.g.
static java.lang.String SMS_TRANSFER_FORCEREMOTE
          When doing file transfers, UNICORE tries to detect whether two storage resources are accessing the same filesystem.
static java.lang.String[] soapActionsForDSig
          for the atomic services, this is the list of SOAP actions (i.e. methods) where we require a digital signature
static java.lang.String TSF
           
static java.lang.String TSF_XNJS_CONFIGFILE
          set the name or the XNJS config file
static java.lang.String TSS
           
static java.lang.String TSS_DISABLE_HOME_PROPERTY
          property defining the vsite name (i.e. default TSS name)
static java.lang.String TSS_FORCE_UNIQUE_STORAGE_IDS
          if set to true, the storages attached to a TSS will always have unique IDs.
static java.lang.String TSS_NAME_PROPERTY
          property defining the vsite name (i.e. default TSS name)
static java.util.Calendar upSince
           
static java.lang.String VERSION
           
static java.lang.String wsrfConfig
           
static java.lang.String WSRFLITE_CONFIG
          the name of the WSRFlite config file
 
Constructor Summary
UAS()
          run the uas using default settings
UAS(java.lang.String propertiesFile)
          run the UAS reading properties from a file
 
Method Summary
static void addMBean(java.lang.Object mbean, java.lang.String name)
          add a JMX MBean under the given name
static void addObserver(java.util.Observer o)
          add an observer to be notified when the property file has changed
static void addSOAPActionsRequiringSignatures(java.lang.String... actions)
          add SOAP actions to the special list requiring signed messages
static boolean getBooleanProperty(java.lang.String key)
          Retrieve a boolean property
static boolean getBooleanProperty(java.lang.String key, boolean defaultValue)
          Retrieve a boolean property
static java.lang.String getConnectionStatus()
           
static java.lang.String getHeader()
           
static de.fzj.unicore.wsrflite.jetty.JettyServer getJettyServer()
           
static long getLastConfigFileChangeTime()
           
static java.lang.String getPerServiceProperty(java.lang.String key, java.lang.String serviceName, java.lang.String defaultValue)
          get a property that is defined per service.
static java.util.Properties getProperties()
           
static java.lang.String getProperty(java.lang.Object key)
           
static java.lang.String getProperty(java.lang.Object key, java.lang.String defaultValue)
          get a property.
static IUASSecurityProperties getSecurityProperties()
          get the security settings for the server, usually an instance of UASSecurityProperties
static java.lang.String getVersion()
           
static void main(java.lang.String[] args)
          start the UAS
args: optional config file name
static boolean needSignature(java.lang.String soapAction)
           
static void removeProperty(java.lang.Object key)
           
static void setProperty(java.lang.Object key, java.lang.Object value)
           
static void setSecurityProperties(IUASSecurityProperties sec)
           
 void start()
          starts the UNICORE/X server asynchronously, i.e. this method returns immediately
 void startSynchronous()
          starts UNICORE/X synchronously, returns only after server is started
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION

DISABLE_SECURITY_AND_ACCESS_CONTROL

public static final java.lang.String DISABLE_SECURITY_AND_ACCESS_CONTROL
for unit testing, set this property to "true" to disable security

See Also:
Constant Field Values

CUSTOM_SECURITYINHANDLER_KEY

public static final java.lang.String CUSTOM_SECURITYINHANDLER_KEY
use this to add a custom XFire handler for security

See Also:
Constant Field Values

CUSTOM_SECURITYOUTHANDLER_KEY

public static final java.lang.String CUSTOM_SECURITYOUTHANDLER_KEY
See Also:
Constant Field Values

AUTOREGISTER_WITH_GATEWAY_KEY

public static final java.lang.String AUTOREGISTER_WITH_GATEWAY_KEY
Enable registration with a gateway

See Also:
Constant Field Values

AUTOREGISTER_WITH_GATEWAY_UPDATE_KEY

public static final java.lang.String AUTOREGISTER_WITH_GATEWAY_UPDATE_KEY
update interval for the registration with a gateway in seconds (default = 30 second)

See Also:
Constant Field Values

DISCOVER_GATEWAY_KEY

public static final java.lang.String DISCOVER_GATEWAY_KEY
Enable multicast discovery of a gateway

See Also:
Constant Field Values

ON_STARTUP_KEY

public static final java.lang.String ON_STARTUP_KEY
To override the default UAS startup code, set this to a list of names (space-separated) of classes implementing java.lang.Runnable

See Also:
Constant Field Values

ON_STARTUP_SELFTEST

public static final java.lang.String ON_STARTUP_SELFTEST
whether to run a connections check after startup (defaults to "true")

See Also:
Constant Field Values

ON_STARTUP_WAIT_KEY

public static final java.lang.String ON_STARTUP_WAIT_KEY
To enable waiting for the gateway on startup, set this property to 'true'

See Also:
Constant Field Values

ON_STARTUP_WAITTIME_KEY

public static final java.lang.String ON_STARTUP_WAITTIME_KEY
To enable waiting for the gateway on startup, set this property to the max wait time in seconds default: 120

See Also:
Constant Field Values

TSS_NAME_PROPERTY

public static final java.lang.String TSS_NAME_PROPERTY
property defining the vsite name (i.e. default TSS name)

See Also:
Constant Field Values

TSS_DISABLE_HOME_PROPERTY

public static final java.lang.String TSS_DISABLE_HOME_PROPERTY
property defining the vsite name (i.e. default TSS name)

See Also:
Constant Field Values

TSS_FORCE_UNIQUE_STORAGE_IDS

public static final java.lang.String TSS_FORCE_UNIQUE_STORAGE_IDS
if set to true, the storages attached to a TSS will always have unique IDs. In the default case, storage names will be formed from the user's xlogin and the storage name, e.g. "a.user-Home".

See Also:
Constant Field Values

SMS_PROTOCOLS

public static final java.lang.String SMS_PROTOCOLS
Property defining the protocols supported by the SMS
This is a list of String-separated protocols, e.g. "RBYTEIO SBYTEIO"

See Also:
Constant Field Values

SMS_TRANSFER_FORCEREMOTE

public static final java.lang.String SMS_TRANSFER_FORCEREMOTE
When doing file transfers, UNICORE tries to detect whether two storage resources are accessing the same filesystem. If yes, the transfer is done by direct copying. Set to "true" to disable this feature.

See Also:
Constant Field Values

WSRFLITE_CONFIG

public static final java.lang.String WSRFLITE_CONFIG
the name of the WSRFlite config file

See Also:
Constant Field Values

TSF_XNJS_CONFIGFILE

public static final java.lang.String TSF_XNJS_CONFIGFILE
set the name or the XNJS config file

See Also:
Constant Field Values

TSF

public static final java.lang.String TSF
See Also:
Constant Field Values

TSS

public static final java.lang.String TSS
See Also:
Constant Field Values

JMS

public static final java.lang.String JMS
See Also:
Constant Field Values

SMS

public static final java.lang.String SMS
See Also:
Constant Field Values

SMF

public static final java.lang.String SMF
See Also:
Constant Field Values

REG

public static final java.lang.String REG
See Also:
Constant Field Values

REGENTRY

public static final java.lang.String REGENTRY
See Also:
Constant Field Values

RESERVATIONS

public static final java.lang.String RESERVATIONS
See Also:
Constant Field Values

ENUMERATION

public static final java.lang.String ENUMERATION
See Also:
Constant Field Values

GLOBAL_REGISTRY_ADVERTISE

public static final java.lang.String GLOBAL_REGISTRY_ADVERTISE
See Also:
Constant Field Values

EXTERNAL_REGISTRY_USE

public static final java.lang.String EXTERNAL_REGISTRY_USE
See Also:
Constant Field Values

REGISTRY_AUTODISCOVER

public static final java.lang.String REGISTRY_AUTODISCOVER
See Also:
Constant Field Values

EXTERNAL_REGISTRY_KEY

public static final java.lang.String EXTERNAL_REGISTRY_KEY
See Also:
Constant Field Values

FTS_BASE

public static final java.lang.String FTS_BASE
you need to add the protocol to this one to get the right service e.g. FTS_BASE+"RBYTEIO" = "FileTransferRBYTEIO"

See Also:
Constant Field Values

soapActionsForDSig

public static final java.lang.String[] soapActionsForDSig
for the atomic services, this is the list of SOAP actions (i.e. methods) where we require a digital signature


upSince

public static final java.util.Calendar upSince

wsrfConfig

public static final java.lang.String wsrfConfig
Constructor Detail

UAS

public UAS()
run the uas using default settings


UAS

public UAS(java.lang.String propertiesFile)
    throws java.lang.Exception
run the UAS reading properties from a file

Parameters:
propertiesFile -
Throws:
java.lang.Exception
Method Detail

getVersion

public static final java.lang.String getVersion()

getHeader

public static final java.lang.String getHeader()

addSOAPActionsRequiringSignatures

public static void addSOAPActionsRequiringSignatures(java.lang.String... actions)
add SOAP actions to the special list requiring signed messages

Parameters:
actions -

needSignature

public static boolean needSignature(java.lang.String soapAction)

getProperties

public static java.util.Properties getProperties()

getProperty

public static java.lang.String getProperty(java.lang.Object key)

getBooleanProperty

public static boolean getBooleanProperty(java.lang.String key)
Retrieve a boolean property

Parameters:
key - - the property key
Returns:
true if the property is set and equal to 'true' (ignoring case)

getBooleanProperty

public static boolean getBooleanProperty(java.lang.String key,
                                         boolean defaultValue)
Retrieve a boolean property

Parameters:
key - - the property key
defaultValue - - the response in case the property is not set
Returns:
true if the property is set and equal to 'true' (ignoring case), else the supplied default

getProperty

public static java.lang.String getProperty(java.lang.Object key,
                                           java.lang.String defaultValue)
get a property. If not found, the WSRFlite kernel properties is checked. If not found, the default value is returned.

Parameters:
key -
defaultValue -
Returns:
property value from UAS config or WSRFlite config files
Throws:
java.lang.NullPointerException - if key is null

setProperty

public static void setProperty(java.lang.Object key,
                               java.lang.Object value)

removeProperty

public static void removeProperty(java.lang.Object key)

getPerServiceProperty

public static java.lang.String getPerServiceProperty(java.lang.String key,
                                                     java.lang.String serviceName,
                                                     java.lang.String defaultValue)
get a property that is defined per service.
As primary fallback, get the "general" property, and as secondary fallback, the provided default value
Thus, the lookup sequence to find the property is:

Parameters:
key - - the property key
serviceName - - the service name
defaultValue - - the value to return if no matching property can be found
Returns:

addObserver

public static void addObserver(java.util.Observer o)
add an observer to be notified when the property file has changed

Parameters:
o - - observer

getSecurityProperties

public static IUASSecurityProperties getSecurityProperties()
get the security settings for the server, usually an instance of UASSecurityProperties


setSecurityProperties

public static void setSecurityProperties(IUASSecurityProperties sec)

getJettyServer

public static de.fzj.unicore.wsrflite.jetty.JettyServer getJettyServer()

getLastConfigFileChangeTime

public static long getLastConfigFileChangeTime()

getConnectionStatus

public static java.lang.String getConnectionStatus()

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
start the UAS
args: optional config file name

Throws:
java.lang.Exception

addMBean

public static void addMBean(java.lang.Object mbean,
                            java.lang.String name)
add a JMX MBean under the given name

Parameters:
mbean -
name -

start

public void start()
           throws java.lang.Exception
starts the UNICORE/X server asynchronously, i.e. this method returns immediately

Throws:
java.lang.Exception

startSynchronous

public void startSynchronous()
                      throws java.lang.Exception
starts UNICORE/X synchronously, returns only after server is started

Throws:
java.lang.Exception


Copyright © 2006-2010 Research Center Juelich. All Rights Reserved.