com.ibm.wsspi.al

Class ALContext

  1. java.lang.Object
  2. extended bycom.ibm.wsspi.al.ALContext
All implemented interfaces:
com.ibm.ws.al.ralclient.RALClientConstants

  1. public class ALContext
  2. extends java.lang.Object
  3. implements com.ibm.ws.al.ralclient.RALClientConstants
The AL Context provides the dynamic api of setting/adding/removing remote AL configuarations

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT
Fields inherited from interface com.ibm.ws.al.ralclient.RALClientConstants
EXTADMINNAME, EXTAPPNAME, EXTDEPLOYMENTMANAGER, EXTSECURITY, EXTSERVER, RALSVRMBEANNAME, WCCM_ALCONFIGURATIONS_NAME, WCCM_ALCONFIGURATIONS_TYPE, WCCM_PROP_NAMEATTRIBUTE_NAME, WCCM_PROP_VALUEATTRIBUTE_NAME, WCCM_RALCONFIG_PROP_NAME, WCCM_RALCONFIG_PROP_TYPE, WCCM_RALSECURITY_NAME, WCCM_RALSECURITY_TYPE, WCCM_RALSERVER_ATTR_PASSWORD, WCCM_RALSERVER_ATTR_SECURITYENABLE, WCCM_RALSERVER_ATTR_USER, WCCM_ROOT_CONFIGOBJ_NAME

Constructor Summary

Constructor and Description
ALContext()

Method Summary

Modifier and Type Method and Description
  1. static
  2. void
add(ALConfiguration config)
add an instance of ALConfig to the current thread's ALContext.
  1. static
  2. void
cleanRALCache(ALConfiguration config)
clean the corresponding ALConfiguration from the cache.
  1. static
  2. void
cleanRALCache(java.util.Collection<ALConfiguration> configs)
clean the corresponding collections of ALConfiguration from the cache.The operation need to happen after setContext/ unset() pair
  1. static
  2. void
remove(ALConfiguration config)
remove an instance of ALConfig from the current thread's ALContext.
  1. static
  2. void
setContext(ALConfiguration config)
set AL context to an instance of ALConfig.
  1. static
  2. void
setContext(java.util.Collection<ALConfiguration> configs)
set AL context to a list of ALConfig.
  1. static
  2. void
setContext(java.lang.String tempName,java.lang.String appName)
This is a easy of use wrapper method.
  1. static
  2. void
unset()
unset the current thread's AL context
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

  1. public static final java.lang.String COPYRIGHT
See Also:

Constructor Detail

ALContext

  1. public ALContext()

Method Detail

setContext

  1. public static void setContext(ALConfiguration config)
  2. throws InvalidConfigException
set AL context to an instance of ALConfig. When context is set to an ALConfig, the AL for the current thread is configured to use the ALConfig to locate artifact
Parameters:
config - an instance of ALConfig
Throws:
InvalidConfigException - this exception will be thrown if the configuration is invalid. For example, in RAL case, if a configuration does not have server information or application name, the configuration is incomplete, therefore is invalid.

setContext

  1. public static void setContext(java.util.Collection<ALConfiguration> configs)
  2. throws InvalidConfigException
set AL context to a list of ALConfig. When context is set to an ALConfig, the AL for the current thread is configured to use the ALConfig to locate artifact
Parameters:
configs - an config list of ALConfig
Throws:
InvalidConfigException - this exception will be thrown if the configuration is invalid. For example, in RAL case, if a configuration does not have server information or application name, the configuration is incomplete, therefore is invalid.

unset

  1. public static void unset()
unset the current thread's AL context

cleanRALCache

  1. public static void cleanRALCache( ALConfiguration config)
  2. throws InvalidConfigException
clean the corresponding ALConfiguration from the cache. The operation need to happen after setContext/ unset() pair
Parameters:
config - the ALConfiguration
Throws:

cleanRALCache

  1. public static void cleanRALCache( java.util.Collection<ALConfiguration> configs)
  2. throws InvalidConfigException
clean the corresponding collections of ALConfiguration from the cache.The operation need to happen after setContext/ unset() pair
Parameters:
configs - the collection of ALConfigurations
Throws:

add

  1. public static void add(ALConfiguration config)
  2. throws InvalidConfigException
add an instance of ALConfig to the current thread's ALContext.
Parameters:
config - an instance of ALConfig
Throws:
InvalidConfigException - this exception will be thrown if the configuration is invalid. For example, in RAL case, if a configuration does not have server information or application name, the configuration is incomplete, therefore is invalid

remove

  1. public static void remove(ALConfiguration config)
remove an instance of ALConfig from the current thread's ALContext.
Parameters:
config - an instance of ALConfig that to be removed

setContext

  1. public static void setContext(java.lang.String tempName,
  2. java.lang.String appName)
  3. throws InvalidConfigException
This is a easy of use wrapper method. What it does is, Step1: it will fetch a RAL template based on tempName. If a template does not exist, it will create a new template using default value. Step2: it will set application property using appName to the template created in step1. Step3: it will set the template to current AL context.
Parameters:
tempName - a template name
appName - a name of a remote application
Throws:
InvalidConfigException - invalid configuration