|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ofbiz.service.DispatchContext
public class DispatchContext
Dispatcher Context
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
attributes
|
protected LocalDispatcher |
dispatcher
|
protected static java.lang.String |
GLOBAL_KEY
|
protected java.lang.ClassLoader |
loader
|
protected java.util.Collection<java.net.URL> |
localReaders
|
static UtilCache<java.lang.String,java.util.Map<java.lang.String,ModelService>> |
modelServiceMapByDispatcher
|
static java.lang.String |
module
|
protected java.lang.String |
name
|
| Constructor Summary | |
|---|---|
DispatchContext(java.lang.String name,
java.util.Collection<java.net.URL> localReaders,
java.lang.ClassLoader loader,
LocalDispatcher dispatcher)
Creates new DispatchContext |
|
| Method Summary | |
|---|---|
java.util.Set<java.lang.String> |
getAllServiceNames()
|
java.lang.Object |
getAttribute(java.lang.String name)
Returns the service attribute for the given name, or null if there is no attribute by that name. |
java.lang.ClassLoader |
getClassLoader()
Gets the classloader of this context |
GenericDelegator |
getDelegator()
Gets the GenericDelegator associated with this context/dispatcher |
LocalDispatcher |
getDispatcher()
Gets the LocalDispatcher used with this context |
ModelService |
getModelService(java.lang.String serviceName)
Gets the ModelService instance that corresponds to given the name |
java.lang.String |
getName()
Gets the name of the local dispatcher |
java.util.Collection<java.net.URL> |
getReaders()
Gets the collection of readers associated with this context |
Security |
getSecurity()
Gets the Security object associated with this dispatcher |
org.w3c.dom.Document |
getWSDL(java.lang.String serviceName,
java.lang.String locationURI)
|
void |
loadReaders()
|
java.util.Map<java.lang.String,java.lang.Object> |
makeValidContext(ModelService model,
java.lang.String mode,
java.util.Map<java.lang.String,? extends java.lang.Object> context)
Uses an existing map of name value pairs and extracts the keys which are used in serviceName Note: This goes not guarantee the context will be 100% valid, there may be missing fields |
java.util.Map<java.lang.String,java.lang.Object> |
makeValidContext(java.lang.String serviceName,
java.lang.String mode,
java.util.Map<java.lang.String,? extends java.lang.Object> context)
Uses an existing map of name value pairs and extracts the keys which are used in serviceName Note: This goes not guarantee the context will be 100% valid, there may be missing fields |
void |
setAttribute(java.lang.String name,
java.lang.Object object)
Binds an object to a given attribute name in this context. |
void |
setDispatcher(LocalDispatcher dispatcher)
Sets the LocalDispatcher used with this context |
| 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 module
protected static final java.lang.String GLOBAL_KEY
public static UtilCache<java.lang.String,java.util.Map<java.lang.String,ModelService>> modelServiceMapByDispatcher
protected transient LocalDispatcher dispatcher
protected transient java.lang.ClassLoader loader
protected java.util.Collection<java.net.URL> localReaders
protected java.util.Map<java.lang.String,java.lang.Object> attributes
protected java.lang.String name
| Constructor Detail |
|---|
public DispatchContext(java.lang.String name,
java.util.Collection<java.net.URL> localReaders,
java.lang.ClassLoader loader,
LocalDispatcher dispatcher)
localReaders - a collection of reader URLsloader - the classloader to use for dispatched services| Method Detail |
|---|
public void loadReaders()
public java.lang.Object getAttribute(java.lang.String name)
name - a String specifying the name of the attribute
public void setAttribute(java.lang.String name,
java.lang.Object object)
name - a String specifying the name of the attributeobject - an Object representing the attribute to be bound.public java.lang.ClassLoader getClassLoader()
public java.util.Collection<java.net.URL> getReaders()
public java.lang.String getName()
public java.util.Map<java.lang.String,java.lang.Object> makeValidContext(java.lang.String serviceName,
java.lang.String mode,
java.util.Map<java.lang.String,? extends java.lang.Object> context)
throws GenericServiceException
serviceName - The name of the service to obtain parameters formode - The mode to use for building the new map (i.e. can be IN or OUT)context - The initial set of values to pull from
GenericServiceException
public java.util.Map<java.lang.String,java.lang.Object> makeValidContext(ModelService model,
java.lang.String mode,
java.util.Map<java.lang.String,? extends java.lang.Object> context)
throws GenericServiceException
model - The ModelService object of the service to obtain parameters formode - The mode to use for building the new map (i.e. can be IN or OUT)context - The initial set of values to pull from
GenericServiceException
public ModelService getModelService(java.lang.String serviceName)
throws GenericServiceException
serviceName - Name of the service
GenericServiceExceptionpublic LocalDispatcher getDispatcher()
public void setDispatcher(LocalDispatcher dispatcher)
dispatcher - The LocalDispatcher to re-assign to this contextpublic GenericDelegator getDelegator()
public Security getSecurity()
public java.util.Set<java.lang.String> getAllServiceNames()
public org.w3c.dom.Document getWSDL(java.lang.String serviceName,
java.lang.String locationURI)
throws GenericServiceException,
WSDLException
GenericServiceException
WSDLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||