Examples of FilterChainElementFactory


Examples of org.openengsb.core.api.remote.FilterChainElementFactory

        return encryptedRequest;
    }

    @Override
    protected FilterAction getSecureRequestHandlerFilterChain() throws Exception {
        FilterChainElementFactory unpackerFactory = new FilterChainElementFactory() {
            @Override
            public FilterChainElement newInstance() throws FilterConfigurationException {
                return new AbstractFilterChainElement<byte[], byte[]>() {
                    private FilterAction next;

                    @Override
                    protected byte[] doFilter(byte[] input, Map<String, Object> metaData) {
                        LOGGER.info("running unpacker");
                        EncryptedMessage deserialize = (EncryptedMessage) SerializationUtils.deserialize(input);
                        byte[] result = (byte[]) next.filter(deserialize, metaData);
                        return result;
                    }

                    @Override
                    public void setNext(FilterAction next) throws FilterConfigurationException {
                        this.next = next;
                    }
                };
            }
        };
        FilterChainElementFactory decrypterFactory = new MessageCryptoFilterFactory(privateKeySource, "AES");
        FilterChainElementFactory parserFactory = new FilterChainElementFactory() {
            @Override
            public FilterChainElement newInstance() throws FilterConfigurationException {
                return new AbstractFilterChainElement<byte[], byte[]>() {
                    private FilterAction next;
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.