de.fzj.unicore.wsrflite
Class Kernel

java.lang.Object
  extended by de.fzj.unicore.wsrflite.Kernel

public class Kernel
extends Object

Central class of WSRFlite, serves for lookup of components, services, and properties
Main class for WSRFlite standalone use

Author:
schuller

Field Summary
static String VERSION
           
static String WSRF_BASEURL
          property defining the base URL where services can be contacted (for example "http://localhost:7777/services").
static String WSRF_CONFIG
           
static String WSRF_CONFIG_DEFAULT
           
static String WSRF_DEPLOYMENT_DYNAMIC_AUTOMATIC
           
static String WSRF_DEPLOYMENT_DYNAMIC_AUTOMATIC_DEFAULT
           
static String WSRF_DEPLOYMENT_DYNAMIC_AUTOMATIC_INTERVAL
           
static String WSRF_DEPLOYMENT_DYNAMIC_AUTOMATIC_INTERVAL_DEFAULT
           
static String WSRF_DEPLOYMENT_DYNAMIC_FROMOUTSIDE
           
static String WSRF_DEPLOYMENT_DYNAMIC_FROMOUTSIDE_DEFAULT
           
static String WSRF_DEPLOYMENT_SERVICE_JARS_DIR
           
static String WSRF_DEPLOYMENT_SERVICE_JARS_DIR_DEFAULT
           
static String WSRF_DEPLOYMENT_SERVICE_JARS_ON_STARTUP
           
static String WSRF_DEPLOYMENT_SERVICE_JARS_ON_STARTUP_DEFAULT
           
static String WSRF_HOST
          property defining the host (e.g.
static String WSRF_PERSISTENCE_BACKEND
          persistence configuration
static String WSRF_PERSISTENCE_STORAGEDIR
           
static String WSRF_PORT
          property defining the port (e.g. 7777)
static String WSRF_SERVLETPATH
          property defining the Servlet context path (usually "/services")
static String WSRF_SGENTRY_TERMINATION_TIME
          property defining the default termination time of service group entries in seconds
static String WSRF_SSL
          SSL configuration
static String WSRF_SSL_CLIENTAUTH
           
static String WSRF_SSL_KEYALIAS
           
static String WSRF_SSL_KEYSTORE
           
static String WSRF_SSL_KEYSTORE_PASS
           
static String WSRF_SSL_KEYTYPE
           
static String WSRF_SSL_TRUSTSTORE
           
static String WSRF_SSL_TRUSTSTORE_PASS
           
 
Method Summary
 String createServiceInstance(String serviceName, Map<String,Object> initParameters)
          convenience method to create a new WSRF instance of a certain service
static Kernel getKernel()
           
static IMessaging getMessaging()
          get access to the message system
 List<de.fzj.unicore.metrix.IMetric<?>> getMonitorMetrics()
          get the list of metrics to be published by the admin service
 String getPerServiceProperty(String key, String serviceName, String defaultValue)
          get a property that is defined per service.
 String getProperty(String key)
           
 String getProperty(String key, String defaultValue)
           
 ISecurityProperties getSecurityProperties()
          retrieve the security properties
 Home getServiceHome(String name)
           
static void main(String[] args)
          Use this when running WSRFlite as a standalone server.
 void registerMonitorMetric(String name)
          add a metric to the list of metrics that are published by the admin service
 void setProperty(String key, String value)
           
 void setSecurityProperties(ISecurityProperties securityProperties)
          set the security properties on this kernel
 void shutdown()
          shutdown all services in a clean manner
static String validateField(String key, String defaultValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION

WSRF_BASEURL

public static final String WSRF_BASEURL
property defining the base URL where services can be contacted (for example "http://localhost:7777/services").
This should NOT end with a slash "/" This is the address that is published in registries, etc

See Also:
Constant Field Values

WSRF_CONFIG

public static final String WSRF_CONFIG
See Also:
Constant Field Values

WSRF_CONFIG_DEFAULT

public static final String WSRF_CONFIG_DEFAULT
See Also:
Constant Field Values

WSRF_HOST

public static final String WSRF_HOST
property defining the host (e.g. "localhost")

See Also:
Constant Field Values

WSRF_PORT

public static final String WSRF_PORT
property defining the port (e.g. 7777)

See Also:
Constant Field Values

WSRF_SERVLETPATH

public static final String WSRF_SERVLETPATH
property defining the Servlet context path (usually "/services")

See Also:
Constant Field Values

WSRF_SGENTRY_TERMINATION_TIME

public static final String WSRF_SGENTRY_TERMINATION_TIME
property defining the default termination time of service group entries in seconds

See Also:
Constant Field Values

WSRF_SSL

public static final String WSRF_SSL
SSL configuration

See Also:
Constant Field Values

WSRF_SSL_CLIENTAUTH

public static final String WSRF_SSL_CLIENTAUTH
See Also:
Constant Field Values

WSRF_SSL_TRUSTSTORE

public static final String WSRF_SSL_TRUSTSTORE
See Also:
Constant Field Values

WSRF_SSL_TRUSTSTORE_PASS

public static final String WSRF_SSL_TRUSTSTORE_PASS
See Also:
Constant Field Values

WSRF_SSL_KEYSTORE

public static final String WSRF_SSL_KEYSTORE
See Also:
Constant Field Values

WSRF_SSL_KEYSTORE_PASS

public static final String WSRF_SSL_KEYSTORE_PASS
See Also:
Constant Field Values

WSRF_SSL_KEYTYPE

public static final String WSRF_SSL_KEYTYPE
See Also:
Constant Field Values

WSRF_SSL_KEYALIAS

public static final String WSRF_SSL_KEYALIAS
See Also:
Constant Field Values

WSRF_PERSISTENCE_BACKEND

public static final String WSRF_PERSISTENCE_BACKEND
persistence configuration

See Also:
Constant Field Values

WSRF_PERSISTENCE_STORAGEDIR

public static final String WSRF_PERSISTENCE_STORAGEDIR
See Also:
Constant Field Values

WSRF_DEPLOYMENT_SERVICE_JARS_DIR

public static final String WSRF_DEPLOYMENT_SERVICE_JARS_DIR
See Also:
Constant Field Values

WSRF_DEPLOYMENT_SERVICE_JARS_DIR_DEFAULT

public static final String WSRF_DEPLOYMENT_SERVICE_JARS_DIR_DEFAULT
See Also:
Constant Field Values

WSRF_DEPLOYMENT_SERVICE_JARS_ON_STARTUP

public static final String WSRF_DEPLOYMENT_SERVICE_JARS_ON_STARTUP
See Also:
Constant Field Values

WSRF_DEPLOYMENT_SERVICE_JARS_ON_STARTUP_DEFAULT

public static final String WSRF_DEPLOYMENT_SERVICE_JARS_ON_STARTUP_DEFAULT
See Also:
Constant Field Values

WSRF_DEPLOYMENT_DYNAMIC_AUTOMATIC

public static final String WSRF_DEPLOYMENT_DYNAMIC_AUTOMATIC
See Also:
Constant Field Values

WSRF_DEPLOYMENT_DYNAMIC_AUTOMATIC_DEFAULT

public static final String WSRF_DEPLOYMENT_DYNAMIC_AUTOMATIC_DEFAULT
See Also:
Constant Field Values

WSRF_DEPLOYMENT_DYNAMIC_AUTOMATIC_INTERVAL

public static final String WSRF_DEPLOYMENT_DYNAMIC_AUTOMATIC_INTERVAL
See Also:
Constant Field Values

WSRF_DEPLOYMENT_DYNAMIC_AUTOMATIC_INTERVAL_DEFAULT

public static final String WSRF_DEPLOYMENT_DYNAMIC_AUTOMATIC_INTERVAL_DEFAULT
See Also:
Constant Field Values

WSRF_DEPLOYMENT_DYNAMIC_FROMOUTSIDE

public static final String WSRF_DEPLOYMENT_DYNAMIC_FROMOUTSIDE
See Also:
Constant Field Values

WSRF_DEPLOYMENT_DYNAMIC_FROMOUTSIDE_DEFAULT

public static final String WSRF_DEPLOYMENT_DYNAMIC_FROMOUTSIDE_DEFAULT
See Also:
Constant Field Values
Method Detail

shutdown

public void shutdown()
shutdown all services in a clean manner


getServiceHome

public Home getServiceHome(String name)

createServiceInstance

public String createServiceInstance(String serviceName,
                                    Map<String,Object> initParameters)
                             throws ResourceNotCreatedException
convenience method to create a new WSRF instance of a certain service

Parameters:
serviceName -
initParameters -
Returns:
the UUID of the new instance
Throws:
ResourceNotCreatedException

getKernel

public static Kernel getKernel()

setSecurityProperties

public void setSecurityProperties(ISecurityProperties securityProperties)
set the security properties on this kernel

Parameters:
securityProperties -

getSecurityProperties

public ISecurityProperties getSecurityProperties()
retrieve the security properties

Returns:
securityProperties

getProperty

public String getProperty(String key)

getProperty

public String getProperty(String key,
                          String defaultValue)

setProperty

public void setProperty(String key,
                        String value)

getPerServiceProperty

public String getPerServiceProperty(String key,
                                    String serviceName,
                                    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:

getMessaging

public static IMessaging getMessaging()
                               throws MessagingException
get access to the message system

Throws:
MessagingException

main

public static void main(String[] args)
                 throws Exception
Use this when running WSRFlite as a standalone server. Services can be configured using an XML file (by default found in conf/wsrflite.xml)

Parameters:
args - First arg is the name of the config file
Throws:
Exception

validateField

public static String validateField(String key,
                                   String defaultValue)

getMonitorMetrics

public List<de.fzj.unicore.metrix.IMetric<?>> getMonitorMetrics()
get the list of metrics to be published by the admin service

Returns:

registerMonitorMetric

public void registerMonitorMetric(String name)
add a metric to the list of metrics that are published by the admin service

Parameters:
name - - the name of the metric to be published
See Also:
MonitorEntriesRP


Copyright © 2010. All Rights Reserved.