|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.activesoap.handler.DefaultHandlerRegistry
Provides a registry of handlers indexed by specific QName
instances as well as providing a default handler which is used for processing
SOAP body elements (or REST root elements) if no QName could be matched.
Constructor Summary | |
DefaultHandlerRegistry()
|
|
DefaultHandlerRegistry(Handler defaultHandler)
|
Method Summary | |
void |
addHandler(QName name,
Handler handler)
Adds a new handler for the given QName |
void |
addHandler(String[] namespaceURIs,
Handler handler)
Adds a new handle to a number of different namespace URIs (typically to handle multiple version URIs for the same handler) |
void |
addHandler(String namepaceURI,
Handler handler)
Adds a new handler for the given namespace URI |
Handler |
getBodyHandler()
Returns the handler that should be used to process the body elements which by default will be a QNameHandler which delegates to the
handler for the current QName otherwise using the handler returned
by getDefaultHandler() |
Handler |
getDefaultHandler()
Returns the default handler which is used when processing body elements which have no QName matching handler. |
Handler |
getHandler(QName name)
Returns the handler bound to the given QName
or null if no handler is bound to this name |
protected Map |
getHandlers()
Provide implementations with direct access to the handler map |
Handler |
removeHandler(QName name)
Removes the handler associated with the given QName |
Handler |
removeHandler(String namepaceURI)
Removes the handler associated with the given namespace URI |
void |
removeHandler(String[] namespaceURIs,
Handler handler)
Removes a handler from a number of different namespace URIs (typically to handle multiple version URIs for the same handler) |
Handler |
removeHandler(String namepaceURI,
Handler handler)
Removes the handler associated with the given namespace URI |
void |
setBodyHandler(Handler bodyHandler)
Sets the handler used to process body elements |
void |
setDefaultHandler(Handler defaultHandler)
Sets the default handler used to process body elements if no handlers are found for a given QName |
protected void |
setHandlers(Map handlers)
Provide implementations with direct access to the handler map |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultHandlerRegistry()
public DefaultHandlerRegistry(Handler defaultHandler)
Method Detail |
public Handler getHandler(QName name)
HandlerRegistry
QName
or null if no handler is bound to this name
getHandler
in interface HandlerRegistry
name
- the name of the element to lookup the handler for
public void addHandler(String namepaceURI, Handler handler)
HandlerRegistry
addHandler
in interface HandlerRegistry
namepaceURI
- handler
- public void addHandler(String[] namespaceURIs, Handler handler)
HandlerRegistry
addHandler
in interface HandlerRegistry
namespaceURIs
- handler
- public void removeHandler(String[] namespaceURIs, Handler handler)
HandlerRegistry
removeHandler
in interface HandlerRegistry
namespaceURIs
- handler
- public void addHandler(QName name, Handler handler)
HandlerRegistry
QName
addHandler
in interface HandlerRegistry
name
- handler
- public Handler removeHandler(QName name)
HandlerRegistry
QName
removeHandler
in interface HandlerRegistry
name
-
public Handler removeHandler(String namepaceURI)
HandlerRegistry
removeHandler
in interface HandlerRegistry
namepaceURI
- public Handler removeHandler(String namepaceURI, Handler handler)
HandlerRegistry
removeHandler
in interface HandlerRegistry
namepaceURI
- public Handler getBodyHandler()
HandlerRegistry
QNameHandler
which delegates to the
handler for the current QName
otherwise using the handler returned
by HandlerRegistry.getDefaultHandler()
getBodyHandler
in interface HandlerRegistry
public void setBodyHandler(Handler bodyHandler)
HandlerRegistry
setBodyHandler
in interface HandlerRegistry
bodyHandler
- the new handler used to process body elementspublic Handler getDefaultHandler()
HandlerRegistry
QName
matching handler.
getDefaultHandler
in interface HandlerRegistry
public void setDefaultHandler(Handler defaultHandler)
HandlerRegistry
QName
setDefaultHandler
in interface HandlerRegistry
protected Map getHandlers()
protected void setHandlers(Map handlers)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |