|
eXo Kernel :: Component :: Common Service 2.4.0-CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.services.naming.InitialContextBinder
public class InitialContextBinder
Class is responsible for binding references at runtime, persists on file and automatically binds after restart.
| Field Summary | |
|---|---|
static String |
BIND_NAME_ATTR
|
static String |
BIND_REFERENCES_ELEMENT
|
protected Map<String,Reference> |
bindings
All current binded references. |
protected String |
bindingsStorePath
Absolute file path to references's storage. |
static String |
CLASS_NAME_ATTR
|
static String |
FACTORY_ATTR
|
static String |
FACTORY_LOCATION_ATTR
|
protected InitialContextInitializer |
initialContextInitializer
Initial context binder. |
static String |
PROPERTY_ELEMENT
|
static String |
REFADDR_ELEMENT
|
static String |
REFERENCE_ELEMENT
|
| Method Summary | |
|---|---|
void |
bind(String bindName,
Reference reference)
Binds the reference in initial contexts and persists list of all binded references into file. |
void |
bind(String bindName,
String className,
String factory,
String factoryLocation,
Map<String,String> refAddr)
Constructs references from params, binds in initial contexts and persists list of all binded references into file. |
Reference |
getReference(String bindName)
Returns reference associated with defined name. |
protected Map<String,Reference> |
readBindings()
Import references from xml-file. |
protected void |
saveBindings()
Export references into xml-file. |
void |
unbind(String bindName)
Unbind the Reference with defined name, remove from the bindings list and persists the rest of references into the file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BIND_REFERENCES_ELEMENT
public static final String REFERENCE_ELEMENT
public static final String PROPERTY_ELEMENT
public static final String REFADDR_ELEMENT
public static final String BIND_NAME_ATTR
public static final String CLASS_NAME_ATTR
public static final String FACTORY_ATTR
public static final String FACTORY_LOCATION_ATTR
protected final InitialContextInitializer initialContextInitializer
protected final String bindingsStorePath
protected Map<String,Reference> bindings
| Method Detail |
|---|
public void bind(String bindName,
String className,
String factory,
String factoryLocation,
Map<String,String> refAddr)
throws NamingException,
FileNotFoundException,
XMLStreamException
bindName - bind nameclassName - class namefactory - factory namefactoryLocation - factory locationrefAddr - map of references's properties
NamingException - if error occurs due to binding
XMLStreamException
FileNotFoundException
public void bind(String bindName,
Reference reference)
throws NamingException,
FileNotFoundException,
XMLStreamException
bindName - bind namereference - reference
NamingException - if error occurs due to binding
FileNotFoundException
XMLStreamException
public void unbind(String bindName)
throws NamingException,
FileNotFoundException,
XMLStreamException
bindName - the Reference's bind name
NamingException
FileNotFoundException
XMLStreamExceptionpublic Reference getReference(String bindName)
bindName - the name on which the reference was binded.
protected void saveBindings()
throws FileNotFoundException,
XMLStreamException
XMLStreamException - if any exception occurs during export
FileNotFoundException - if can't open output stream from file
protected Map<String,Reference> readBindings()
throws FileNotFoundException,
XMLStreamException
XMLStreamException - if errors occurs during import
FileNotFoundException - if can't open input stream from file
|
eXo Kernel :: Component :: Common Service 2.4.0-CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||