|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sap.netweaver.bc.rf.util.context.ContextFactoryRegistry
Context factory registry holding all registered context factories and providing means to get and set a context. In order to access a context through this class, each context factory needs to register with this registry. This must be done prior to any call trying to access a context for that context factory. Beware of the dangers registering a context factory in the static initializer. No one ensures, that the static initializer is called before a context for the context factory is requested by the type unsafe API of this registry.
IContextFactory| Constructor Summary | |
ContextFactoryRegistry()
|
|
| Method Summary | |
static java.lang.Object |
getTypeUnsafeContext(java.lang.Class contextFactoryClass)
Get actual context from stack of contexts. |
java.lang.Object |
getTypeUnsafeContextOrNullIfUnavailable(java.lang.Class contextFactoryClass)
Get actual context from stack of contexts. |
static java.lang.Object |
popTypeUnsafeContext(java.lang.Class contextFactoryClass)
Get and remove actual context from the stack of contexts. |
static void |
pushTypeUnsafeContext(java.lang.Class contextFactoryClass,
java.lang.Object context)
Add new context to the top of the stack of contexts. |
static void |
registerContextFactory(IContextFactory contextFactory)
Register context factory instance. |
static void |
setTypeUnsafeContext(java.lang.Class contextFactoryClass,
java.lang.Object context)
Replace actual context with new one in stack of contexts. |
static void |
unregisterContextFactory(java.lang.Class contextFactoryClass)
Unregister context factory by context factory class (name). |
static void |
unregisterContextFactory(IContextFactory contextFactory)
Unregister context factory by context factory instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ContextFactoryRegistry()
| Method Detail |
public static void registerContextFactory(IContextFactory contextFactory)
throws ContextFactoryRegistrationError
contextFactory - context factory instance to be registeredContextFactoryRegistrationError - when the context factory is
already registered with the context factory registry
public static void unregisterContextFactory(java.lang.Class contextFactoryClass)
throws ContextFactoryRegistrationError
contextFactoryClass - context factory class (name) to be unregisteredContextFactoryRegistrationError - when the context factory isn't
registered with the context factory registry
public static void unregisterContextFactory(IContextFactory contextFactory)
throws ContextFactoryRegistrationError
contextFactory - context factory to be unregisteredContextFactoryRegistrationError - when the context factory isn't
registered with the context factory registry
public static java.lang.Object getTypeUnsafeContext(java.lang.Class contextFactoryClass)
throws ContextUnavailableException,
ContextFactoryRegistrationError
contextFactoryClass - context factory class used to look up context
factoryContextUnavailableException - when no (more) context is available
on the context stackContextFactoryRegistrationError - when the context factory isn't
registered with the context factory registrypublic java.lang.Object getTypeUnsafeContextOrNullIfUnavailable(java.lang.Class contextFactoryClass)
contextFactoryClass - TBD: Description of the incoming method
parameter
public static void setTypeUnsafeContext(java.lang.Class contextFactoryClass,
java.lang.Object context)
throws ContextFactoryRegistrationError
context - new actual context replacing the old one on the stackcontextFactoryClass - context factory class used to look up context
factoryContextFactoryRegistrationError - when the context factory isn't
registered with the context factory registry
public static java.lang.Object popTypeUnsafeContext(java.lang.Class contextFactoryClass)
throws ContextUnavailableException,
ContextFactoryRegistrationError
contextFactoryClass - context factory class used to look up context
factoryContextUnavailableException - when no (more) context is available
on the context stackContextFactoryRegistrationError - when the context factory isn't
registered with the context factory registry
public static void pushTypeUnsafeContext(java.lang.Class contextFactoryClass,
java.lang.Object context)
throws ContextFactoryRegistrationError
context - new actual contextcontextFactoryClass - context factory class used to look up context
factoryContextFactoryRegistrationError - when the context factory isn't
registered with the context factory registry
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||