com.ibm.oti.shared

Class SharedClassTokenHelperImpl

  1. java.lang.Object
  2. extended bycom.ibm.oti.shared.SharedAbstractHelper
  3. extended bycom.ibm.oti.shared.SharedClassAbstractHelper
  4. extended bycom.ibm.oti.shared.SharedClassTokenHelperImpl
All implemented interfaces:
SharedClassHelper, SharedClassTokenHelper, SharedHelper

  1. public class SharedClassTokenHelperImpl
  2. extends SharedClassAbstractHelper
  3. implements SharedClassTokenHelper
Implementation of SharedClassTokenHelper.

Version:
initial
Author:
OTI
See Also:
SharedClassTokenHelper, SharedClassHelperFactory, SharedClassAbstractHelper

Method Summary

Modifier and Type Method and Description
  1. byte[]
findSharedClass(java.lang.String token,java.lang.String className)
  1. boolean
storeSharedClass(java.lang.String token,java.lang.Class clazz)
Methods inherited from class com.ibm.oti.shared.SharedClassAbstractHelper
getSharingFilter, isSharedClassCookie, setSharingFilter
Methods inherited from class com.ibm.oti.shared.SharedAbstractHelper
getClassLoader
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.ibm.oti.shared.SharedClassHelper
getSharingFilter, setSharingFilter
Methods inherited from interface com.ibm.oti.shared.SharedHelper
getClassLoader

Method Detail

findSharedClass

  1. public byte[] findSharedClass(java.lang.String token,
  2. java.lang.String className)

Description copied from interface: SharedClassTokenHelper

Find a class in the shared cache using a specific token and class name.

A class will be returned only for an exact String match of both the token and class name. Otherwise, null is returned.
To obtain an instance of the class, the byte[] returned must be passed to defineClass by the caller ClassLoader.

Specified by:
Parameters:
token - String. A token generated by the ClassLoader
className - String. The name of the class to be found
Returns:
byte[]. A byte array describing the class found, or null.

storeSharedClass

  1. public boolean storeSharedClass( java.lang.String token,
  2. java.lang.Class clazz)

Description copied from interface: SharedClassTokenHelper

Store a class in the shared cache using a specific token.

The class being stored must have been defined by the caller ClassLoader.
Returns true if the class is stored successfully or false otherwise.
Will return false if the class being stored was not defined by the caller ClassLoader.

Specified by:
Parameters:
token - String. A token generated by the ClassLoader
clazz - Class. The class to store in the shared cache
Returns:
boolean. True if the class was stored successfully, false otherwise.