Package javax.xml.ws.handler

Examples of javax.xml.ws.handler.Handler


        boolean continueProcessing = true;

        try {
            int index = invokedHandlers.size() - 2;
            while (index >= 0 && continueProcessing) {
                Handler h = invokedHandlers.get(index);
                if (h instanceof LogicalHandler) {
                    continueProcessing = h.handleFault(logicalMessageContext);
                } else {
                    continueProcessing = h.handleFault(protocolMessageContext);
                }

                if (!continueProcessing) {
                    invokeReversedClose();
                    break;
View Full Code Here


     * either handleMessage or handleFault
     */
    private void invokeReversedClose() {
        int index = invokedHandlers.size() - 1;
        while (index >= 0) {
            Handler handler = invokedHandlers.get(index);
            if (handler instanceof LogicalHandler) {
                handler.close(logicalMessageContext);
            } else {
                handler.close(protocolMessageContext);
            }
            invokedHandlers.remove(index);
            index--;
        }
        closed = true;
View Full Code Here

                Class<? extends Handler> handlerClass = Class.forName(
                                                                      trimString(ht.getHandlerClass()
                                                                          .getValue()), true, classLoader)
                    .asSubclass(Handler.class);

                Handler handler = handlerClass.newInstance();
                LOG.fine("adding handler to chain: " + handler);
                configureHandler(handler, ht);
                handlerChain.add(handler);
            } catch (Exception e) {
                throw new WebServiceException(BUNDLE.getString("HANDLER_INSTANTIATION_EXC"), e);
View Full Code Here

            try {
                Class<? extends Handler> handlerClass = loadClass(handler.getHandlerClass()).asSubclass(Handler.class);
                ClientInjectionProcessor<Handler> processor = new ClientInjectionProcessor<Handler>(handlerClass, injections, handler.getPostConstruct(), handler.getPreDestroy(), context);
                processor.createInstance();
                processor.postConstruct();
                Handler handlerInstance = processor.getInstance();

                handlers.add(handlerInstance);
                handlerInstances.add(processor);
            } catch (Exception e) {
                throw new WebServiceException("Failed to instantiate handler", e);
View Full Code Here

                        handler.getPostConstruct(),
                        handler.getPreDestroy(),
                        unwrap(context));
                processor.createInstance();
                processor.postConstruct();
                Handler handlerInstance = processor.getInstance();

                handlers.add(handlerInstance);
                handlerInstances.add(processor);
            } catch (Exception e) {
                throw new WebServiceException("Failed to instantiate handler", e);
View Full Code Here

import javax.xml.ws.handler.Handler;

public class HandlerLifecycleManagerImpl implements HandlerLifecycleManager {
    public Handler createHandlerInstance(MessageContext context, Class handlerClass) throws LifecycleException, ResourceInjectionException {
        Handler instance = null;

        try {
            instance = (Handler) handlerClass.newInstance();
        } catch (Exception e) {
            throw new LifecycleException("Failed to create handler", e);
View Full Code Here

                Class<? extends Handler> handlerClass = Class.forName(
                                                                      trimString(ht.getHandlerClass()
                                                                          .getValue()), true, classLoader)
                    .asSubclass(Handler.class);

                Handler handler = handlerClass.newInstance();
                LOG.fine("adding handler to chain: " + handler);
                configureHandler(handler, ht);
                handlerChain.add(handler);
            } catch (Exception e) {
                throw new WebServiceException(BUNDLE.getString("HANDLER_INSTANTIATION_EXC"), e);
View Full Code Here

        boolean continueProcessing = true;

        try {
            int index = invokedHandlers.size() - 2;
            while (index >= 0 && continueProcessing) {
                Handler h = invokedHandlers.get(index);
                if (h instanceof LogicalHandler) {
                    continueProcessing = h.handleFault(logicalMessageContext);
                } else {
                    continueProcessing = h.handleFault(protocolMessageContext);
                }

                if (!continueProcessing) {
                    invokeReversedClose();
                    break;
View Full Code Here

     * either handleMessage or handleFault
     */
    private void invokeReversedClose() {
        int index = invokedHandlers.size() - 1;
        while (index >= 0) {
            Handler handler = invokedHandlers.get(index);
            if (handler instanceof LogicalHandler) {
                handler.close(logicalMessageContext);
            } else {
                handler.close(protocolMessageContext);
            }
            invokedHandlers.remove(index);
            index--;
        }
        closed = true;
View Full Code Here

                Class<? extends Handler> handlerClass = Class.forName(
                        trimString(ht.getHandlerClass()
                                .getValue()), true, classLoader)
                        .asSubclass(Handler.class);

                Handler handler = handlerClass.newInstance();
                log.debug("adding handler to chain: " + handler);
                handlerChain.add(handler);
            } catch (Exception e) {
                throw new WebServiceException("Failed to instantiate handler", e);
            }
View Full Code Here

TOP

Related Classes of javax.xml.ws.handler.Handler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.