org.codehaus.activesoap
Interface HandlerRegistry

All Known Implementing Classes:
DefaultHandlerRegistry

public interface HandlerRegistry

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.

Version:
$Revision: 1.6 $

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
 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
 

Method Detail

getHandler

public Handler getHandler(QName name)
Returns the handler bound to the given QName or null if no handler is bound to this name

Parameters:
name - the name of the element to lookup the handler for
Returns:
the handler bound to the name or null if none is bound

addHandler

public void addHandler(String namepaceURI,
                       Handler handler)
Adds a new handler for the given namespace URI

Parameters:
namepaceURI -
handler -

addHandler

public 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)

Parameters:
namespaceURIs -
handler -

removeHandler

public 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)

Parameters:
namespaceURIs -
handler -

addHandler

public void addHandler(QName name,
                       Handler handler)
Adds a new handler for the given QName

Parameters:
name -
handler -

removeHandler

public Handler removeHandler(QName name)
Removes the handler associated with the given QName

Parameters:
name -
Returns:

removeHandler

public Handler removeHandler(String namepaceURI)
Removes the handler associated with the given namespace URI

Parameters:
namepaceURI -

removeHandler

public Handler removeHandler(String namepaceURI,
                             Handler handler)
Removes the handler associated with the given namespace URI

Parameters:
namepaceURI -

getBodyHandler

public 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()


setBodyHandler

public void setBodyHandler(Handler bodyHandler)
Sets the handler used to process body elements

Parameters:
bodyHandler - the new handler used to process body elements

getDefaultHandler

public Handler getDefaultHandler()
Returns the default handler which is used when processing body elements which have no QName matching handler.


setDefaultHandler

public void setDefaultHandler(Handler defaultHandler)
Sets the default handler used to process body elements if no handlers are found for a given QName



Copyright © 2004-2005 LogicBlaze, Inc.. All Rights Reserved.