de.fhg.igd.semoa.webservice
Class HandlerDescriptor

java.lang.Object
  extended byde.fhg.igd.semoa.webservice.HandlerDescriptor

public class HandlerDescriptor
extends Object

Specifies how to deploy an Axis handler using WebserviceService.

Version:
$Id$
Author:
Dennis Bartussek

Nested Class Summary
protected  class HandlerDescriptor.AxisEngineNamespaceContext
           
 
Field Summary
static String GLOBAL_REQUEST
          Specifies a deployment of a global handler into the request flow.
private static String GLOBAL_REQUEST_PATH
           
static String GLOBAL_RESPONSE
          Specifies a deployment of a global handler into the response flow.
private static String GLOBAL_RESPONSE_PATH
           
private static Logger log_
          The Logger instance for this class
private  String name_
           
private  Map parameters_
           
private  String path_
           
private static String REQUEST_SUFFIX
           
private static String RESPONSE_SUFFIX
           
private static String SERVICE_PATH
           
static String SERVICE_REQUEST
          Specifies a deployment of a service handler into the request flow.
static String SERVICE_RESPONSE
          Specifies a deployment of a service handler into the response flow.
private static String TRANSPORT_PATH
           
static String TRANSPORT_REQUEST
          Specifies a deployment of a transport handler into the request flow.
static String TRANSPORT_RESPONSE
          Specifies a deployment of a transport handler into the response flow.
private  String type_
           
private static String USR_HANDLER
           
 
Constructor Summary
  HandlerDescriptor(Class handlerClass, Map parameters, String context, String identifier)
          Creates a new HandlerDescriptor.
  HandlerDescriptor(Class handlerClass, String context, String identifier)
          Creates a new HandlerDescriptor.
private HandlerDescriptor(Node node)
           
 
Method Summary
private static boolean checkDeployment(List deployedHandlers, HandlerDescriptor descriptor)
           
private  Node createHandlerNode(Document document)
           
private  Node createParameterNode(Document document, String name, String value)
           
private  String createPath(String context, String identifier)
           
static String createType(Class type)
           
 boolean equals(Object object)
           
 String getContext()
           
 String getIdentifier()
           
 String getName()
           
 Map getParameters()
           
 String getPath()
           
private  String getPath(Node node)
           
 String getType()
           
 String insertInto(org.apache.axis.AxisEngine engine)
           
private static String insertNSPrefix(String path)
           
private  boolean isUserHandler()
           
static List listHandlers(org.apache.axis.AxisEngine engine)
           
 String removeFrom(org.apache.axis.AxisEngine engine)
           
 void setName(String name)
           
 void setParameters(Map parameters)
           
private  void setPath(String path)
           
 void setType(String type)
           
 String toString()
           
private  boolean validateContext(String context)
           
private  boolean validateHandlerClass(Class handlerClass)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GLOBAL_RESPONSE

public static final String GLOBAL_RESPONSE
Specifies a deployment of a global handler into the response flow.

See Also:
Constant Field Values

GLOBAL_REQUEST

public static final String GLOBAL_REQUEST
Specifies a deployment of a global handler into the request flow.

See Also:
Constant Field Values

SERVICE_RESPONSE

public static final String SERVICE_RESPONSE
Specifies a deployment of a service handler into the response flow.

See Also:
Constant Field Values

SERVICE_REQUEST

public static final String SERVICE_REQUEST
Specifies a deployment of a service handler into the request flow.

See Also:
Constant Field Values

TRANSPORT_RESPONSE

public static final String TRANSPORT_RESPONSE
Specifies a deployment of a transport handler into the response flow.

See Also:
Constant Field Values

TRANSPORT_REQUEST

public static final String TRANSPORT_REQUEST
Specifies a deployment of a transport handler into the request flow.

See Also:
Constant Field Values

USR_HANDLER

private static final String USR_HANDLER
See Also:
Constant Field Values

GLOBAL_RESPONSE_PATH

private static final String GLOBAL_RESPONSE_PATH
See Also:
Constant Field Values

GLOBAL_REQUEST_PATH

private static final String GLOBAL_REQUEST_PATH
See Also:
Constant Field Values

SERVICE_PATH

private static final String SERVICE_PATH
See Also:
Constant Field Values

TRANSPORT_PATH

private static final String TRANSPORT_PATH
See Also:
Constant Field Values

RESPONSE_SUFFIX

private static final String RESPONSE_SUFFIX
See Also:
Constant Field Values

REQUEST_SUFFIX

private static final String REQUEST_SUFFIX
See Also:
Constant Field Values

log_

private static Logger log_
The Logger instance for this class


path_

private String path_

name_

private String name_

type_

private String type_

parameters_

private Map parameters_
Constructor Detail

HandlerDescriptor

public HandlerDescriptor(Class handlerClass,
                         String context,
                         String identifier)
                  throws IllegalArgumentException
Creates a new HandlerDescriptor.

Parameters:
handlerClass - the Class of the handler to deploy. This Class is required to implement the org.axis.apache.Handler interface.
context - the String representation of the desired deployment context. Valid context values are:
identifier - further specifies the deployment location. The exact meaning of identifier depends on the specified context:
Throws:
IllegalArgumentException - if handlerClass does not implement the org.axis.apache.Handler interface or context is not equal to one of the specified values.

HandlerDescriptor

public HandlerDescriptor(Class handlerClass,
                         Map parameters,
                         String context,
                         String identifier)
                  throws IllegalArgumentException
Creates a new HandlerDescriptor.

Parameters:
handlerClass - the Class of the handler to deploy. This Class is required to implement the org.axis.apache.Handler interface.
parameters - the handlers parameters. Both keys and values are expected to be instances of String.
context - the String representation of the desired deployment context. Valid context values are:
identifier - further specifies the deployment location. The exact meaning of identifier depends on the specified context:
Throws:
IllegalArgumentException - if handlerClass does not implement the org.axis.apache.Handler interface or context is not equal to one of the specified values.

HandlerDescriptor

private HandlerDescriptor(Node node)
Method Detail

getName

public String getName()

getParameters

public Map getParameters()

getPath

public String getPath()

getType

public String getType()

setName

public void setName(String name)

setParameters

public void setParameters(Map parameters)

setType

public void setType(String type)

equals

public boolean equals(Object object)

toString

public String toString()

insertInto

public String insertInto(org.apache.axis.AxisEngine engine)
                  throws AxisException,
                         ObjectExistsException
Throws:
AxisException
ObjectExistsException

removeFrom

public String removeFrom(org.apache.axis.AxisEngine engine)
                  throws AxisException
Throws:
AxisException

getContext

public String getContext()

getIdentifier

public String getIdentifier()

createType

public static String createType(Class type)

listHandlers

public static List listHandlers(org.apache.axis.AxisEngine engine)
                         throws AxisException
Throws:
AxisException

checkDeployment

private static boolean checkDeployment(List deployedHandlers,
                                       HandlerDescriptor descriptor)

createHandlerNode

private Node createHandlerNode(Document document)

createParameterNode

private Node createParameterNode(Document document,
                                 String name,
                                 String value)

createPath

private String createPath(String context,
                          String identifier)

getPath

private String getPath(Node node)

insertNSPrefix

private static String insertNSPrefix(String path)

isUserHandler

private boolean isUserHandler()

setPath

private void setPath(String path)

validateContext

private boolean validateContext(String context)

validateHandlerClass

private boolean validateHandlerClass(Class handlerClass)


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.