org.systinet.wasp.handler
Class WaspHandlerInfo

java.lang.Object
  extended byjavax.xml.rpc.handler.HandlerInfo
      extended byorg.systinet.wasp.handler.WaspHandlerInfo
All Implemented Interfaces:
java.io.Serializable

public abstract class WaspHandlerInfo
extends HandlerInfo

WaspHandlerInfo is an extension of JAX-RPC class HandlerInfo. It provides richer API for defining handler's understands headers. This additional information is mainly used during runtime WSDL generation to create .NET compatible wsdl's. This class also contains methods dealing with custom configuration created by WSO2 SOA Enablement Server Configuration Configurable framework.

Since:
4.6
See Also:
Serialized Form
Component:
Core

Field Summary
static int DIRECTION_ALL
           
static int DIRECTION_FAULT
           
static int DIRECTION_IN
           
static int DIRECTION_OUT
           
static int POSITION_LAST
           
 
Constructor Summary
protected WaspHandlerInfo(java.lang.Class handlerClass, QName[] headers)
          Creates new instance of WaspHandlerInfo based on given handler class.
 
Method Summary
static WaspHandlerInfo create(java.lang.Class handlerClass)
          Creates new instance of WaspHandlerInfo based on given handler class.
static WaspHandlerInfo create(java.lang.Class handlerClass, QName[] headers)
          Creates new instance of WaspHandlerInfo based on given handler class.
static WaspHandlerInfo create(Handler instance)
          Creates new instance of WaspHandlerInfo based on given handler instance.
static WaspHandlerInfo create(Handler instance, QName[] headers)
          Creates new instance of WaspHandlerInfo based on given handler instance.
static WaspHandlerInfo create(HeaderProcessor hpInstance, boolean needsBody)
          Deprecated.  
abstract  Configurable getConfiguration()
          Returns handler configuration.
abstract  int getDirection()
          Returns direction of given handler.
abstract  java.lang.Class getHeaderSchema(QName header)
          Returns definition for given header.
abstract  void setConfiguration(Configurable config)
          Sets handler configuration.
abstract  void setDirection(int direction)
          Sets direction of given handler.
abstract  void setHeaderSchema(QName header, java.lang.Class headerClass)
          When header has specified such a scheme, it is put into generated wsdl file during service publishing.
 java.lang.String toString()
           
 
Methods inherited from class javax.xml.rpc.handler.HandlerInfo
getHandlerClass, getHandlerConfig, getHeaders, setHandlerClass, setHandlerConfig, setHeaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DIRECTION_IN

public static final int DIRECTION_IN
See Also:
Constant Field Values

DIRECTION_OUT

public static final int DIRECTION_OUT
See Also:
Constant Field Values

DIRECTION_FAULT

public static final int DIRECTION_FAULT
See Also:
Constant Field Values

DIRECTION_ALL

public static final int DIRECTION_ALL
See Also:
Constant Field Values

POSITION_LAST

public static final int POSITION_LAST
See Also:
Constant Field Values
Constructor Detail

WaspHandlerInfo

protected WaspHandlerInfo(java.lang.Class handlerClass,
                          QName[] headers)
Creates new instance of WaspHandlerInfo based on given handler class.

Parameters:
handlerClass - handler's implementation class
headers - handler's understands headers
Method Detail

create

public static WaspHandlerInfo create(Handler instance)
Creates new instance of WaspHandlerInfo based on given handler instance.

Parameters:
instance - instance of handler

create

public static WaspHandlerInfo create(java.lang.Class handlerClass)
Creates new instance of WaspHandlerInfo based on given handler class.

Parameters:
handlerClass - handler's implementation class

create

public static WaspHandlerInfo create(Handler instance,
                                     QName[] headers)
Creates new instance of WaspHandlerInfo based on given handler instance.

Parameters:
instance - instance of handler
headers - handler's understands headers

create

public static WaspHandlerInfo create(java.lang.Class handlerClass,
                                     QName[] headers)
Creates new instance of WaspHandlerInfo based on given handler class.

Parameters:
handlerClass - handler class
headers - handler's understands headers

create

public static WaspHandlerInfo create(HeaderProcessor hpInstance,
                                     boolean needsBody)
Deprecated.  

This constructor provides possibility to represent deprecated header processor as a handler.

Parameters:
hpInstance - header processor instance
needsBody - does this header access message body(optimization)

getConfiguration

public abstract Configurable getConfiguration()
Returns handler configuration. Returns null by default for runtime registered handlers unless set explicitly by developer. For persistently configured handlers, this configuration is taken from service endpoint or service client configuration file.

Returns:
handler's configuration

setConfiguration

public abstract void setConfiguration(Configurable config)
Sets handler configuration. This configuration is temporary so it IS NOT stored to service endpoint or service client configuration file.

Parameters:
config - additional configuration

toString

public java.lang.String toString()

setHeaderSchema

public abstract void setHeaderSchema(QName header,
                                     java.lang.Class headerClass)
When header has specified such a scheme, it is put into generated wsdl file during service publishing. Such a header definition is than located as a special part of operations defined in porttype.

Parameters:
header - header to be generated
headerClass - header scheme definition

getHeaderSchema

public abstract java.lang.Class getHeaderSchema(QName header)
Returns definition for given header. Returns null when no scheme was set.

Parameters:
header - header
Returns:
header scheme

getDirection

public abstract int getDirection()
Returns direction of given handler. Handler is set to process messages from all direction by default

Returns:
direction DIRECTION_IN,DIRECTION_OUT, DIRECTION_FAULT or DIRECTION_ALL

setDirection

public abstract void setDirection(int direction)
Sets direction of given handler. Handler is set to process messages from all direction by default

Parameters:
direction - direction DIRECTION_IN,DIRECTION_OUT, DIRECTION_FAULT or DIRECTION_ALL