com.ibm.oti.shared

Class SharedClassHelperFactoryImpl

  1. java.lang.Object
  2. extended bycom.ibm.oti.shared.SharedAbstractHelperFactory
  3. extended bycom.ibm.oti.shared.SharedClassHelperFactoryImpl
All implemented interfaces:
SharedClassHelperFactory

  1. public class SharedClassHelperFactoryImpl
  2. extends SharedAbstractHelperFactory
  3. implements SharedClassHelperFactory
Implementation of SharedClassHelperFactory.

Version:
initial
Author:
OTI
See Also:
SharedClassHelperFactory, SharedAbstractHelperFactory

Constructor Summary

Constructor and Description
SharedClassHelperFactoryImpl()

Method Summary

Modifier and Type Method and Description
  1. SharedClassHelper
findHelperForClassLoader(java.lang.ClassLoader loader)
  1. SharedClassTokenHelper
getTokenHelper(java.lang.ClassLoader loader)
  1. SharedClassTokenHelper
getTokenHelper(java.lang.ClassLoader loader,SharedClassFilter filter)
  1. SharedClassURLClasspathHelper
getURLClasspathHelper(java.lang.ClassLoader loader,java.net.URL[] classpath)
  1. SharedClassURLClasspathHelper
getURLClasspathHelper(java.lang.ClassLoader loader,java.net.URL[] classpath,SharedClassFilter filter)
  1. SharedClassURLHelper
getURLHelper(java.lang.ClassLoader loader)
  1. SharedClassURLHelper
getURLHelper(java.lang.ClassLoader loader,SharedClassFilter filter)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SharedClassHelperFactoryImpl

  1. public SharedClassHelperFactoryImpl( )

Method Detail

findHelperForClassLoader

  1. public SharedClassHelper findHelperForClassLoader( java.lang.ClassLoader loader)

Description copied from interface: SharedClassHelperFactory

Utility function which returns a SharedClassHelper for a given ClassLoader.

Can be used to determine whether a given ClassLoader already has a helper, before calling a getter method.

Returns an existing SharedClassHelper or null.

Specified by:
Parameters:
loader - ClassLoader. ClassLoader which may or may not have a SharedClassHelper
Returns:
SharedClassHelper. A helper if one exists for this ClassLoader or null otherwise.
See Also:

getTokenHelper

  1. public SharedClassTokenHelper getTokenHelper( java.lang.ClassLoader loader,
  2. SharedClassFilter filter)
  3. throws HelperAlreadyDefinedException

Description copied from interface: SharedClassHelperFactory

Return a SharedClassTokenHelper for a given ClassLoader.

Creates a new SharedClassTokenHelper if one cannot be found, otherwise returns existing SharedClassTokenHelper.

Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper.

Returns null if a SecurityManager is installed and there is no SharedClassPermission for the ClassLoader specified.

Specified by:
Parameters:
loader - ClassLoader. ClassLoader to which this SharedClassTokenHelper will belong
filter - SharedClassURLFilter. Specify a filter which limits the classes that are found or stored in the cache
Returns:
SharedClassTokenHelper. A new or existing SharedClassTokenHelper
Throws:
See Also:

getTokenHelper

  1. public SharedClassTokenHelper getTokenHelper( java.lang.ClassLoader loader)
  2. throws HelperAlreadyDefinedException

Description copied from interface: SharedClassHelperFactory

Return a SharedClassTokenHelper for a given ClassLoader.

Creates a new SharedClassTokenHelper if one cannot be found, otherwise returns existing SharedClassTokenHelper.

Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper.

Returns null if a SecurityManager is installed and there is no SharedClassPermission for the ClassLoader specified.

Specified by:
Parameters:
loader - ClassLoader. ClassLoader to which this SharedClassTokenHelper will belong
Returns:
SharedClassTokenHelper. A new or existing SharedClassTokenHelper
Throws:
See Also:

getURLHelper

  1. public SharedClassURLHelper getURLHelper( java.lang.ClassLoader loader,
  2. SharedClassFilter filter)
  3. throws HelperAlreadyDefinedException

Description copied from interface: SharedClassHelperFactory

Return a SharedClassURLHelper for a given ClassLoader.

Creates a new SharedClassURLHelper if one cannot be found, otherwise returns existing SharedClassURLHelper.

If a new SharedClassHelper is created, the specified SharedClassURLFilter is applied to it. If the filter argument is null, no filter is applied.

Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper.

Returns null if a SecurityManager is installed and there is no SharedClassPermission for the ClassLoader specified.

Specified by:
Parameters:
loader - ClassLoader. ClassLoader to which this SharedClassURLHelper will belong
filter - SharedClassURLFilter. Specify a filter which limits the classes that are found or stored in the cache
Returns:
SharedClassURLHelper. A new or existing SharedClassURLHelper
Throws:
See Also:

getURLHelper

  1. public SharedClassURLHelper getURLHelper( java.lang.ClassLoader loader)
  2. throws HelperAlreadyDefinedException

Description copied from interface: SharedClassHelperFactory

Return a SharedClassURLHelper for a given ClassLoader.

Creates a new SharedClassURLHelper if one cannot be found, otherwise returns existing SharedClassURLHelper.

Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper.

Returns null if a SecurityManager is installed and there is no SharedClassPermission for the ClassLoader specified.

Specified by:
Parameters:
loader - ClassLoader. ClassLoader to which this SharedClassURLHelper will belong
Returns:
SharedClassURLHelper. A new or existing SharedClassURLHelper
Throws:
See Also:

getURLClasspathHelper

  1. public SharedClassURLClasspathHelper getURLClasspathHelper( java.lang.ClassLoader loader,
  2. java.net.URL[] classpath,
  3. SharedClassFilter filter)
  4. throws HelperAlreadyDefinedException

Description copied from interface: SharedClassHelperFactory

Return a SharedClassURLClasspathHelper for a given ClassLoader.

Creates a new SharedClassURLClasspathHelper if one cannot be found, otherwise if the classpath specified matches the classpath of an existing helper, returns existing SharedClassURLClasspathHelper.

If a new SharedClassHelper is created, the specified SharedClassURLFilter is applied to it. If the filter argument is null, no filter is applied.

Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper OR if the ClassLoader has a SharedClassURLClasspathHelper with a different classpath.

Returns null if a SecurityManager is installed and there is no SharedClassPermission for the ClassLoader specified.

Specified by:
Parameters:
loader - ClassLoader. ClassLoader to which this SharedClassURLClasspathHelper will belong
classpath - URL[]. The current URL classpath of this ClassLoader
filter - SharedClassURLFilter. Specify a filter which limits the classes that are found or stored in the cache
Returns:
SharedClassURLClasspathHelper. A new or existing SharedClassURLClasspathHelper
Throws:
See Also:

getURLClasspathHelper

  1. public SharedClassURLClasspathHelper getURLClasspathHelper( java.lang.ClassLoader loader,
  2. java.net.URL[] classpath)
  3. throws HelperAlreadyDefinedException

Description copied from interface: SharedClassHelperFactory

Return a SharedClassURLClasspathHelper for a given ClassLoader.

Creates a new SharedClassURLClasspathHelper if one cannot be found, otherwise if the classpath specified matches the classpath of an existing helper, returns existing SharedClassURLClasspathHelper.

Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper OR if the ClassLoader has a SharedClassURLClasspathHelper with a different classpath.

Returns null if a SecurityManager is installed and there is no SharedClassPermission for the ClassLoader specified.

Specified by:
Parameters:
loader - ClassLoader. ClassLoader to which this SharedClassURLClasspathHelper will belong
classpath - URL[]. The current URL classpath of this ClassLoader
Returns:
SharedClassURLClasspathHelper. A new or existing SharedClassURLClasspathHelper
Throws:
See Also: