|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.speedo.naming.lib.NamingManagerFactory
public class NamingManagerFactory
This small fractal component is in charge of the naming specialization in
Speedo. This component is a factory of NamingManager.
Each NamingManager manages a type of naming. Currently Speedo provides the
following naming manager implementations:
- UserIdCompositeNamingManager
- UserIdSingleNamingManager
- LongIdNamingManager
- OLongIdNamingManager
- RdbSequenceNamingManager
The NamingManagerFactory has 3 dependencies:
- The CacheManager permits for some PNamingContext to lookup persistent
object in the cache before doing I/O (polymorphism case for instance).
- The POManagerFactory permits to fetch the SequenceManager associated to
the POMF.
- The PMapper permits to NamingManager to use some internal persistent
classes (ex generator).
NamingManager
,
UserIdSingleNamingManager
,
UserIdCompositeNamingManager
,
RdbSequenceNamingManager
,
LongIdNamingManager
,
OLongIdNamingManager
,
PolymorphIdNamingManager
Field Summary | |
---|---|
static java.lang.String |
CACHE_MANAGER_BINDING
fractal binding name to the cache manager |
static java.lang.String |
MAPPER_BINDING
fractal binding name to the mapper |
static java.lang.String |
PMF_BINDING
|
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
---|
STARTED, STOPPED |
Constructor Summary | |
---|---|
NamingManagerFactory()
|
Method Summary | |
---|---|
void |
bindFc(java.lang.String s,
java.lang.Object o)
|
void |
bindNamingManager(NamingManager nm)
Binds a new NamaingManager in this factory |
void |
clean()
Clean the nmf. |
org.objectweb.jorm.naming.api.PName |
decode(org.objectweb.jorm.naming.api.PNameCoder pnc,
java.lang.Object oid,
java.lang.Class clazz,
JormFactory jf)
Decodes an object identifer into a PName. |
java.lang.Object |
encode(org.objectweb.jorm.naming.api.PName pn)
Encodes the persistent identifier (PName) into an object identifier usable, externaly to the Speedo system. |
CacheManager |
getCache()
|
java.lang.String |
getFcState()
|
org.objectweb.util.monolog.api.Logger |
getLogger()
|
org.objectweb.jorm.api.PMapper |
getMapper()
|
NamingManager |
getNamingManager(SpeedoClass sc)
|
NamingManager |
getNamingManager(java.lang.String hints,
java.lang.ClassLoader classloader)
|
POManagerFactoryItf |
getPmf()
|
java.lang.String[] |
listFc()
|
java.lang.Object |
lookupFc(java.lang.String s)
|
void |
setCache(CacheManager cache)
|
void |
setLogger(org.objectweb.util.monolog.api.Logger logger)
|
void |
setMapper(org.objectweb.jorm.api.PMapper mapper)
|
void |
setPmf(POManagerFactoryItf pmf)
|
void |
startFc()
|
void |
stopFc()
|
void |
unbindFc(java.lang.String s)
|
boolean |
unbindNamingManager(NamingManager nm)
Unbinds an existing NamaingManager in this factory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MAPPER_BINDING
public static final java.lang.String CACHE_MANAGER_BINDING
public static final java.lang.String PMF_BINDING
Constructor Detail |
---|
public NamingManagerFactory()
Method Detail |
---|
public org.objectweb.jorm.api.PMapper getMapper()
public void setMapper(org.objectweb.jorm.api.PMapper mapper)
public CacheManager getCache()
public void setCache(CacheManager cache)
public java.lang.String[] listFc()
listFc
in interface BindingController
public java.lang.Object lookupFc(java.lang.String s)
lookupFc
in interface BindingController
public void bindFc(java.lang.String s, java.lang.Object o)
bindFc
in interface BindingController
public void unbindFc(java.lang.String s)
unbindFc
in interface BindingController
public java.lang.String getFcState()
getFcState
in interface LifeCycleController
public void startFc() throws IllegalLifeCycleException
startFc
in interface LifeCycleController
IllegalLifeCycleException
public void stopFc() throws IllegalLifeCycleException
stopFc
in interface LifeCycleController
IllegalLifeCycleException
public POManagerFactoryItf getPmf()
public void setPmf(POManagerFactoryItf pmf)
public org.objectweb.util.monolog.api.Logger getLogger()
public void setLogger(org.objectweb.util.monolog.api.Logger logger)
public void bindNamingManager(NamingManager nm)
NamingManagerFactoryItf
bindNamingManager
in interface NamingManagerFactoryItf
nm
- is the new NamingManager instancepublic boolean unbindNamingManager(NamingManager nm)
NamingManagerFactoryItf
unbindNamingManager
in interface NamingManagerFactoryItf
nm
- is the NamingManager instance to forget
public NamingManager getNamingManager(SpeedoClass sc) throws SpeedoException
getNamingManager
in interface NamingManagerFactoryItf
sc
- is the speedo meta object representing the persistent class.
SpeedoException
- if no NamingManager can manage the persistent
class.public NamingManager getNamingManager(java.lang.String hints, java.lang.ClassLoader classloader) throws org.objectweb.jorm.api.PException
getNamingManager
in interface NamingManagerFactoryItf
hints
- is string value containing information permitting to find
the naming manager required.classloader
- is the class loader of the application.
org.objectweb.jorm.api.PException
public org.objectweb.jorm.naming.api.PName decode(org.objectweb.jorm.naming.api.PNameCoder pnc, java.lang.Object oid, java.lang.Class clazz, JormFactory jf) throws org.objectweb.jorm.api.PException
NamingManagerFactoryItf
decode
in interface NamingManagerFactoryItf
pnc
- is the PNamingContext managing the naming of the referenced
persistent classoid
- is the object identifierclazz
- is the java class of the referenced class. this paramter
permits of course to access to the class loader of the application.jf
- is the JormFactory managing the persistent class.
org.objectweb.jorm.api.PException
- if it is not possible to decode the object identifier
corresponding to the specified class.NamingManagerFactoryItf.encode(PName)
public java.lang.Object encode(org.objectweb.jorm.naming.api.PName pn) throws org.objectweb.jorm.api.PException
NamingManagerFactoryItf
encode
in interface NamingManagerFactoryItf
pn
- is the Pname to encode
org.objectweb.jorm.api.PException
NamingManagerFactoryItf.decode(PNameCoder, Object, java.lang.Class, JormFactory)
public void clean()
clean
in interface NamingManagerFactoryItf
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |