weborb.handler
Class Handlers

java.lang.Object
  extended by weborb.handler.Handlers
All Implemented Interfaces:
IHandlerConstants, ILoggingConstants

public class Handlers
extends java.lang.Object
implements ILoggingConstants, IHandlerConstants

Handlers

Author:
Midnight Coders, LLC

Field Summary
 
Fields inherited from interface weborb.util.log.ILoggingConstants
DEBUG, DEFAULT_LOGGER, ERROR, EXCEPTION, INFO, INSTR, MESSAGESERVER, SECURITY, SERIALIZATION
 
Fields inherited from interface weborb.handler.IHandlerConstants
CONSTRUCTING_INSTANCE_EJB, CREATE, DELEGATING_INSPECTION_HANDLER, DELEGATING_INVOCATION_HANDLER, EJB_HANDLER, EJB_OBJECT_CREATED, EJB_OBJECT_NOT_FOUND_HTTP_SESSION, EJB_OBJECT_SUCCESSFULLY_CONSTRUCTED, ERROR_INSPECTING_WSDL, ERROR_INVOKING_METHOD_WEB_SERVICE, EXCEPTION_INVOKING_EJB, EXCEPTION_THROWN_FROM_INV_HANDLER, EXCEPTION_THROWN_INSPECTOR, FOUND_HOME_OBJECT, GETEJBMETADATA, HANDLER_ARGUMENT_BE_NULL, HANDLER_SUCCESSFULLY_INSPECTED_SERVICE, HANDLER_SUCCESSFULLY_INVOKED, INSPECTING_WSDL_DOCUMENT, INVALID_HANDLER_CANT_BE_NULL, INVOKING_AGAINST_SERVICE_WSDL, LOOKING_HOME_INTERFACE, METHOD_NAME, METHODS_ARGUMENT_DASH, NO_SOAP_BINDINGS_FOUND_WSDL, NONE_HANDLERS_ABLE_INSPECT_SERVICE, NONE_HANDLERS_HANDLE_METH_INVOCATION, ON_THE_SERVICE, PARENTHESIS_ARGUMENT_COUNT, PROCESSED_INSPECTION_REQUEST, PROCESSING_INSPECTION_REQUEST_FOR, PROCESSING_INSPECTION_REQUEST_WSH, PROCESSING_INVOCATION_REQUEST_FOR, PROCESSING_INVOCATION_REQUEST_WSH, PROCESSING_SERVICE_INSPECTION, PROCESSING_SERVICE_INVOCATION, RECIEVED_WEB_SERVICE_INVOCATION_RESPONSE, REGISTERING_INSPECTION_HANDLER, REGISTERING_INVOCATION_HANDLER, REMOVE, RETRIEVING_EJB_OBJECT, SPACE_METHODNAME, SPACE_MS, SUCCESSFULLY_BOUND_WSDL_DOCUMENT_CREATED_WSP, THIS_CREATE_REQUEST, UNABLE_FIND_METHOD, UNABLE_FIND_OBJECT_JNDI, UNABLE_INSPECT_EJB, UNABLE_INSPECT_WSDL_EXCEPTION, UNABLE_LOCATE_EJB, UNABLE_LOCATE_EJB_CREATE, UNABLE_RESOLVE_AMBIGUITY, UNAUTHORIZED_ACCESS_RESOURCE, WEB_SERVICE_HANDLER, WEBSERVICE_HANDLER, WSH_UNABLE_PERFORM_INSPECTION
 
Constructor Summary
Handlers()
           
 
Method Summary
static void addInspectionHandler(IInspectionHandler handler)
          Add a handler to the list of inspection handlers.
static void addInvocationHandler(IInvocationHandler handler)
          Add a handler to the list of invocation handlers.
static IInspectionHandler getInspectionHandler(java.lang.String className)
           
static IInspectionHandler[] getInspectionHandlers()
           
static IInvocationHandler getInvocationHandler(java.lang.String className)
           
static IInvocationHandler[] getInvocationHandlers()
           
static Value inspect(java.lang.String targetObject)
           
static Value invoke(java.lang.String targetObject, java.lang.String function, java.lang.Object[] arguments)
          Handle invocation request.
static void removeInspectionHandler(IInspectionHandler handler)
           
static void removeInvocationHandler(IInvocationHandler handler)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Handlers

public Handlers()
Method Detail

addInspectionHandler

public static void addInspectionHandler(IInspectionHandler handler)
Add a handler to the list of inspection handlers. Inspection handlers are responsible for processing service inspection requests.

Parameters:
handler - inspection handler object

removeInspectionHandler

public static void removeInspectionHandler(IInspectionHandler handler)
Parameters:
handler -

getInspectionHandler

public static IInspectionHandler getInspectionHandler(java.lang.String className)
Parameters:
className -
Returns:

getInvocationHandlers

public static IInvocationHandler[] getInvocationHandlers()
Returns:

getInspectionHandlers

public static IInspectionHandler[] getInspectionHandlers()
Returns:

addInvocationHandler

public static void addInvocationHandler(IInvocationHandler handler)
Add a handler to the list of invocation handlers. Invocation handlers are responsible for handling service invocation requests

Parameters:
handler - invocation handler object to add

removeInvocationHandler

public static void removeInvocationHandler(IInvocationHandler handler)
Parameters:
handler -

getInvocationHandler

public static IInvocationHandler getInvocationHandler(java.lang.String className)
Parameters:
className -
Returns:

invoke

public static Value invoke(java.lang.String targetObject,
                           java.lang.String function,
                           java.lang.Object[] arguments)
                    throws ServiceException
Handle invocation request. This method iterates over a list of invocation handlers and gives every handler a chance to handle the invocation. The iteration stops as soon as a handler returns a non-null value or throws ServiceException

Parameters:
targetObject - address of the object to invoke method against. Service address is specific to the type of services it represents. For example, a web service service address is the WSDL URL, java class' address is the class name.
function - name of the method to invoke
arguments - array of arguments to pass into function call
Returns:
Value object or null if there's no response
Throws:
ServiceException

inspect

public static Value inspect(java.lang.String targetObject)
Parameters:
targetObject -
Returns:
Throws:
ServiceException


Discuss WebORB

Copyright 2003-2008 Midnight Coders, Inc. All Rights Reserved.