Examples of HandlerConfiguration


Examples of cc.plural.jsonij.marshal.helpers.HandlerConfiguration

    }

    @Test
    public void testMarshalHandlerClass() throws JSONMarshalerException, IOException, ParserException, IllegalAccessException, InstantiationException, ClassNotFoundException {
        System.out.println("testMarshalHandlerClass");
        HandlerConfiguration config = new HandlerConfiguration();
        Map<String, Class<?>> handlers = new HashMap<String, Class<?>>();
        handlers.put("http", JSON.class);
        handlers.put("ftp", JSONMarshaler.class);
        config.setHandlers(handlers);
       
        JSON outputJSON = JSONMarshaler.marshalObject(config);
        System.out.println("Output JSON (no codec):" + outputJSON);

        JSONMarshaler.registerCodec(Class.class, ClassJSONValueCodec.class);

        outputJSON = JSONMarshaler.marshalObject(config);
        System.out.println("Output JSON (codec):" + outputJSON);

        HandlerConfiguration reload = (HandlerConfiguration) JSONMarshaler.marshalJSON(outputJSON, config.getClass());
        assertNotNull(reload);
        assertEquals(config.getHandlers(), reload.getHandlers());
    }
View Full Code Here

Examples of com.sun.xml.internal.ws.client.HandlerConfiguration

        this.roles = that.roles;
    }

    private void setUpHandlersOnce() {
        handlers = new ArrayList<Handler>();
        HandlerConfiguration handlerConfig = ((BindingImpl) binding).getHandlerConfig();
        List<MessageHandler> msgHandlersSnapShot= handlerConfig.getMessageHandlers();
        if (!msgHandlersSnapShot.isEmpty()) {
            handlers.addAll(msgHandlersSnapShot);
            roles = new HashSet<String>();
            roles.addAll(handlerConfig.getRoles());
        }
    }
View Full Code Here

Examples of com.sun.xml.internal.ws.client.HandlerConfiguration

        return new ServerSOAPHandlerTube(this, cloner);
    }

    private void setUpHandlersOnce() {
        handlers = new ArrayList<Handler>();
        HandlerConfiguration handlerConfig = ((BindingImpl) binding).getHandlerConfig();
        List<SOAPHandler> soapSnapShot= handlerConfig.getSoapHandlers();
        if (!soapSnapShot.isEmpty()) {
            handlers.addAll(soapSnapShot);
            roles = new HashSet<String>();
            roles.addAll(handlerConfig.getRoles());
        }
    }
View Full Code Here

Examples of com.sun.xml.internal.ws.client.HandlerConfiguration

            }else {
                throw new HandlerException("handler.not.valid.type",
                    handler.getClass());
            }
        }
        return new HandlerConfiguration(roles,portKnownHeaders,handlerChain,
                logicalHandlers,soapHandlers,messageHandlers,handlerKnownHeaders);
    }
View Full Code Here

Examples of com.sun.xml.ws.client.HandlerConfiguration

    protected MessageContextFactory messageContextFactory;

    protected BindingImpl(BindingID bindingId, WebServiceFeature ... features) {
        this.bindingId = bindingId;
        handlerConfig = new HandlerConfiguration(Collections.<String>emptySet(), Collections.<Handler>emptyList());
        if (handlerConfig.getHandlerKnownHeaders() != null)
            knownHeaders.addAll(handlerConfig.getHandlerKnownHeaders());
        this.features = new WebServiceFeatureList(features);
        this.features.validate();
    }
View Full Code Here

Examples of com.sun.xml.ws.client.HandlerConfiguration

        this.roles = that.roles;
    }

    private void setUpHandlersOnce() {
        handlers = new ArrayList<Handler>();
        HandlerConfiguration handlerConfig = ((BindingImpl) binding).getHandlerConfig();
        List<MessageHandler> msgHandlersSnapShot= handlerConfig.getMessageHandlers();
        if (!msgHandlersSnapShot.isEmpty()) {
            handlers.addAll(msgHandlersSnapShot);
            roles = new HashSet<String>();
            roles.addAll(handlerConfig.getRoles());
        }
    }
View Full Code Here

Examples of com.sun.xml.ws.client.HandlerConfiguration

            }else {
                throw new HandlerException("handler.not.valid.type",
                    handler.getClass());
            }
        }
        return new HandlerConfiguration(roles,portKnownHeaders,handlerChain,
                logicalHandlers,soapHandlers,messageHandlers,handlerKnownHeaders);
    }
View Full Code Here

Examples of com.sun.xml.ws.client.HandlerConfiguration

        if (roles.contains(ROLE_NONE)) {
            throw new WebServiceException(ClientMessages.INVALID_SOAP_ROLE_NONE());
        }
        this.roles = roles;
        addRequiredRoles();
        HandlerConfiguration oldConfig = getHandlerConfig();
        setHandlerConfig(new HandlerConfiguration(this.roles, portKnownHeaders, oldConfig.getHandlerChain(),
                oldConfig.getLogicalHandlers(),oldConfig.getSoapHandlers(), oldConfig.getMessageHandlers(),
                oldConfig.getHandlerKnownHeaders()));
    }
View Full Code Here

Examples of com.sun.xml.ws.client.HandlerConfiguration

                throw new WebServiceException(ClientMessages.NON_LOGICAL_HANDLER_SET(handler.getClass()));
            } else {
                logicalHandlers.add((LogicalHandler) handler);
            }
        }
        return new HandlerConfiguration(
                Collections.<String>emptySet(),
                Collections.<QName>emptySet(),
                handlerChain,logicalHandlers,null,null,null);
    }
View Full Code Here

Examples of com.sun.xml.ws.client.HandlerConfiguration

        return new ServerSOAPHandlerTube(this, cloner);
    }

    private void setUpHandlersOnce() {
        handlers = new ArrayList<Handler>();
        HandlerConfiguration handlerConfig = ((BindingImpl) binding).getHandlerConfig();
        List<SOAPHandler> soapSnapShot= handlerConfig.getSoapHandlers();
        if (!soapSnapShot.isEmpty()) {
            handlers.addAll(soapSnapShot);
            roles = new HashSet<String>();
            roles.addAll(handlerConfig.getRoles());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.