Examples of ChainInitiationObserver


Examples of org.apache.cxf.transport.ChainInitiationObserver

                super.addListener(d, e);
                return;
            }

            if (mo instanceof ChainInitiationObserver) {
                ChainInitiationObserver cio = (ChainInitiationObserver) mo;
               
                Binding b = e.getBinding();
                Binding b2 = cio.getEndpoint().getBinding();
                if (b == b2) {
                    //re-registering the same endpoint?
                    return;
                }
                Object o = cio.getEndpoint().get("allow-multiplex-endpoint");
                if (o instanceof String) {
                    o = Boolean.parseBoolean((String)o);
                } else if (o == null) {
                    o = Boolean.FALSE;
                }
                if (b instanceof org.apache.cxf.binding.soap.SoapBinding
                    && b2 instanceof org.apache.cxf.binding.soap.SoapBinding
                    && ((org.apache.cxf.binding.soap.SoapBinding)b).getSoapVersion()
                        .equals(((org.apache.cxf.binding.soap.SoapBinding)b2).getSoapVersion())
                    && Boolean.FALSE.equals(o)) {
                   
                    throw new RuntimeException("Soap "
                                               + ((org.apache.cxf.binding.soap.SoapBinding)b)
                                                   .getSoapVersion().getVersion()
                                               + " endpoint already registered on address "
                                               + e.getEndpointInfo().getAddress());
                }
               
                MultipleEndpointObserver newMO = new MultipleEndpointObserver(getBus()) {
                    @Override
                    protected Message createMessage(Message message) {
                        return new SoapMessage(message);
                    }
                };
   
                newMO.getBindingInterceptors().add(new AttachmentInInterceptor());
                newMO.getBindingInterceptors().add(new StaxInInterceptor());
   
                // This will not work if one of the endpoints disables message
                // processing. But, if you've disabled message processing, you
                // probably aren't going to use this feature.
               
                newMO.getBindingInterceptors().add(new ReadHeadersInterceptor(getBus(), (SoapVersion)null));
                newMO.getBindingInterceptors().add(new StartBodyInterceptor());
                newMO.getBindingInterceptors().add(new CheckFaultInterceptor());
   
                // Add in a default selection interceptor
                newMO.getRoutingInterceptors().add(new EndpointSelectionInterceptor());
   
                newMO.getEndpoints().add(cio.getEndpoint());
   
                mo = newMO;
            }
   
            if (mo instanceof MultipleEndpointObserver) {
View Full Code Here

Examples of org.apache.cxf.transport.ChainInitiationObserver

    protected void addMessageFromBinding(ExtensibilityElement ext, BindingOperationInfo bop,
                                         boolean isInput) {
    }

    public void addListener(Destination d, Endpoint e) {
        ChainInitiationObserver observer = new ChainInitiationObserver(e, bus);

        d.setMessageObserver(observer);
    }
View Full Code Here

Examples of org.apache.cxf.transport.ChainInitiationObserver

            super.addListener(d, e);
            return;
        }

        if (mo instanceof ChainInitiationObserver) {
            ChainInitiationObserver cio = (ChainInitiationObserver) mo;
           
            Binding b = e.getBinding();
            Binding b2 = cio.getEndpoint().getBinding();
            if (b == b2) {
                //re-registering the same endpoint?
                return;
            }
            Object o = cio.getEndpoint().get("allow-multiplex-endpoint");
            if (o instanceof String) {
                o = Boolean.parseBoolean((String)o);
            } else if (o == null) {
                o = Boolean.FALSE;
            }
           
            if (b instanceof org.apache.cxf.binding.soap.SoapBinding
                && b2 instanceof org.apache.cxf.binding.soap.SoapBinding
                && ((org.apache.cxf.binding.soap.SoapBinding)b).getSoapVersion()
                    .equals(((org.apache.cxf.binding.soap.SoapBinding)b2).getSoapVersion())
                && Boolean.FALSE.equals(o)) {
               
                throw new RuntimeException("Soap "
                                           + ((org.apache.cxf.binding.soap.SoapBinding)b)
                                               .getSoapVersion().getVersion()
                                           + " endpoint already registered on address "
                                           + e.getEndpointInfo().getAddress());
            }
           
            MultipleEndpointObserver newMO = new MultipleEndpointObserver(getBus()) {
                @Override
                protected Message createMessage(Message message) {
                    return new SoapMessage(message);
                }
            };

            newMO.getBindingInterceptors().add(new AttachmentInInterceptor());
            newMO.getBindingInterceptors().add(new StaxInInterceptor());

            // This will not work if we one of the endpoints disables message
            // processing. But, if you've disabled message processing, you
            // probably aren't going to use this feature.
           
            newMO.getBindingInterceptors().add(new ReadHeadersInterceptor(getBus(), (SoapVersion)null));
            newMO.getBindingInterceptors().add(new StartBodyInterceptor());
            newMO.getBindingInterceptors().add(new CheckFaultInterceptor());

            // Add in a default selection interceptor
            newMO.getRoutingInterceptors().add(new EndpointSelectionInterceptor());

            newMO.getEndpoints().add(cio.getEndpoint());

            mo = newMO;
        }

        if (mo instanceof MultipleEndpointObserver) {
View Full Code Here

Examples of org.apache.cxf.transport.ChainInitiationObserver

            super.addListener(d, e);
            return;
        }

        if (mo instanceof ChainInitiationObserver) {
            ChainInitiationObserver cio = (ChainInitiationObserver) mo;
            MultipleEndpointObserver newMO = new MultipleEndpointObserver(getBus()) {
                @Override
                protected Message createMessage(Message message) {
                    return new SoapMessage(message);
                }
            };

            newMO.getBindingInterceptors().add(new AttachmentInInterceptor());
            newMO.getBindingInterceptors().add(new StaxInInterceptor());

            // This will not work if we one of the endpoints disables message
            // processing. But, if you've disabled message processing, you
            // probably aren't going to use this feature.
            newMO.getBindingInterceptors().add(new ReadHeadersInterceptor(getBus()));

            // Add in a default selection interceptor
            newMO.getRoutingInterceptors().add(new EndpointSelectionInterceptor());

            newMO.getEndpoints().add(cio.getEndpoint());

            mo = newMO;
        }

        if (mo instanceof MultipleEndpointObserver) {
View Full Code Here

Examples of org.apache.cxf.transport.ChainInitiationObserver

            super.addListener(d, e);
            return;
        }

        if (mo instanceof ChainInitiationObserver) {
            ChainInitiationObserver cio = (ChainInitiationObserver) mo;
            MultipleEndpointObserver newMO = new MultipleEndpointObserver(getBus()) {
                @Override
                protected Message createMessage(Message message) {
                    return new SoapMessage(message);
                }
            };

            newMO.getBindingInterceptors().add(new AttachmentInInterceptor());
            newMO.getBindingInterceptors().add(new StaxInInterceptor());

            // This will not work if we one of the endpoints disables message
            // processing. But, if you've disabled message processing, you
            // probably aren't going to use this feature.
            newMO.getBindingInterceptors().add(new ReadHeadersInterceptor(getBus()));
            newMO.getBindingInterceptors().add(new CheckFaultInterceptor());

            // Add in a default selection interceptor
            newMO.getRoutingInterceptors().add(new EndpointSelectionInterceptor());

            newMO.getEndpoints().add(cio.getEndpoint());

            mo = newMO;
        }

        if (mo instanceof MultipleEndpointObserver) {
View Full Code Here

Examples of org.apache.cxf.transport.ChainInitiationObserver

    protected void addMessageFromBinding(ExtensibilityElement ext, BindingOperationInfo bop,
                                         boolean isInput) {
    }

    public void addListener(Destination d, Endpoint e) {
        ChainInitiationObserver observer = new ChainInitiationObserver(e, bus);

        d.setMessageObserver(observer);
    }
View Full Code Here

Examples of org.apache.cxf.transport.ChainInitiationObserver

            super.addListener(d, e);
            return;
        }

        if (mo instanceof ChainInitiationObserver) {
            ChainInitiationObserver cio = (ChainInitiationObserver) mo;
           
            Binding b = e.getBinding();
            Binding b2 = cio.getEndpoint().getBinding();
            if (b == b2) {
                //re-registering the same endpoint?
                return;
            }
            Object o = cio.getEndpoint().get("allow-multiplex-endpoint");
            if (o instanceof String) {
                o = Boolean.parseBoolean((String)o);
            } else if (o == null) {
                o = Boolean.FALSE;
            }
           
            if (b instanceof org.apache.cxf.binding.soap.SoapBinding
                && b2 instanceof org.apache.cxf.binding.soap.SoapBinding
                && ((org.apache.cxf.binding.soap.SoapBinding)b).getSoapVersion()
                    .equals(((org.apache.cxf.binding.soap.SoapBinding)b2).getSoapVersion())
                && Boolean.FALSE.equals(o)) {
               
                throw new RuntimeException("Soap "
                                           + ((org.apache.cxf.binding.soap.SoapBinding)b)
                                               .getSoapVersion().getVersion()
                                           + " endpoint already registered on address "
                                           + e.getEndpointInfo().getAddress());
            }
           
            MultipleEndpointObserver newMO = new MultipleEndpointObserver(getBus()) {
                @Override
                protected Message createMessage(Message message) {
                    return new SoapMessage(message);
                }
            };

            newMO.getBindingInterceptors().add(new AttachmentInInterceptor());
            newMO.getBindingInterceptors().add(new StaxInInterceptor());

            // This will not work if we one of the endpoints disables message
            // processing. But, if you've disabled message processing, you
            // probably aren't going to use this feature.
           
            newMO.getBindingInterceptors().add(new ReadHeadersInterceptor(getBus(), (SoapVersion)null));
            newMO.getBindingInterceptors().add(new CheckFaultInterceptor());

            // Add in a default selection interceptor
            newMO.getRoutingInterceptors().add(new EndpointSelectionInterceptor());

            newMO.getEndpoints().add(cio.getEndpoint());

            mo = newMO;
        }

        if (mo instanceof MultipleEndpointObserver) {
View Full Code Here

Examples of org.apache.cxf.transport.ChainInitiationObserver

        return bi;
    }


    public void addListener(Destination d, Endpoint e) {
        ChainInitiationObserver observer = new ChainInitiationObserver(e, bus);

        d.setMessageObserver(observer);
    }
View Full Code Here

Examples of org.apache.cxf.transport.ChainInitiationObserver

            super.addListener(d, e);
            return;
        }

        if (mo instanceof ChainInitiationObserver) {
            ChainInitiationObserver cio = (ChainInitiationObserver) mo;
           
            Binding b = e.getBinding();
            Binding b2 = cio.getEndpoint().getBinding();
            if (b == b2) {
                //re-registering the same endpoint?
                return;
            }
            Object o = cio.getEndpoint().get("allow-multiplex-endpoint");
            if (o instanceof String) {
                o = Boolean.parseBoolean((String)o);
            } else if (o == null) {
                o = Boolean.FALSE;
            }
           
            if (b instanceof org.apache.cxf.binding.soap.SoapBinding
                && b2 instanceof org.apache.cxf.binding.soap.SoapBinding
                && ((org.apache.cxf.binding.soap.SoapBinding)b).getSoapVersion()
                    .equals(((org.apache.cxf.binding.soap.SoapBinding)b2).getSoapVersion())
                && Boolean.FALSE.equals(o)) {
               
                throw new RuntimeException("Soap "
                                           + ((org.apache.cxf.binding.soap.SoapBinding)b)
                                               .getSoapVersion().getVersion()
                                           + " endpoint already registered on address "
                                           + e.getEndpointInfo().getAddress());
            }
           
            MultipleEndpointObserver newMO = new MultipleEndpointObserver(getBus()) {
                @Override
                protected Message createMessage(Message message) {
                    return new SoapMessage(message);
                }
            };

            newMO.getBindingInterceptors().add(new AttachmentInInterceptor());
            newMO.getBindingInterceptors().add(new StaxInInterceptor());

            // This will not work if we one of the endpoints disables message
            // processing. But, if you've disabled message processing, you
            // probably aren't going to use this feature.
            newMO.getBindingInterceptors().add(new ReadHeadersInterceptor(getBus()));
            newMO.getBindingInterceptors().add(new CheckFaultInterceptor());

            // Add in a default selection interceptor
            newMO.getRoutingInterceptors().add(new EndpointSelectionInterceptor());

            newMO.getEndpoints().add(cio.getEndpoint());

            mo = newMO;
        }

        if (mo instanceof MultipleEndpointObserver) {
View Full Code Here

Examples of org.apache.cxf.transport.ChainInitiationObserver

                super.addListener(d, e);
                return;
            }

            if (mo instanceof ChainInitiationObserver) {
                ChainInitiationObserver cio = (ChainInitiationObserver) mo;
               
                Binding b = e.getBinding();
                Binding b2 = cio.getEndpoint().getBinding();
                if (b == b2) {
                    //re-registering the same endpoint?
                    return;
                }
                Object o = cio.getEndpoint().get("allow-multiplex-endpoint");
                if (o instanceof String) {
                    o = Boolean.parseBoolean((String)o);
                } else if (o == null) {
                    o = Boolean.FALSE;
                }
                if (b instanceof org.apache.cxf.binding.soap.SoapBinding
                    && b2 instanceof org.apache.cxf.binding.soap.SoapBinding
                    && ((org.apache.cxf.binding.soap.SoapBinding)b).getSoapVersion()
                        .equals(((org.apache.cxf.binding.soap.SoapBinding)b2).getSoapVersion())
                    && Boolean.FALSE.equals(o)) {
                   
                    throw new RuntimeException("Soap "
                                               + ((org.apache.cxf.binding.soap.SoapBinding)b)
                                                   .getSoapVersion().getVersion()
                                               + " endpoint already registered on address "
                                               + e.getEndpointInfo().getAddress());
                }
               
                MultipleEndpointObserver newMO = new MultipleEndpointObserver(getBus()) {
                    @Override
                    protected Message createMessage(Message message) {
                        return new SoapMessage(message);
                    }
                };
   
                newMO.getBindingInterceptors().add(new AttachmentInInterceptor());
                newMO.getBindingInterceptors().add(new StaxInInterceptor());
   
                // This will not work if one of the endpoints disables message
                // processing. But, if you've disabled message processing, you
                // probably aren't going to use this feature.
               
                newMO.getBindingInterceptors().add(new ReadHeadersInterceptor(getBus(), (SoapVersion)null));
                newMO.getBindingInterceptors().add(new StartBodyInterceptor());
                newMO.getBindingInterceptors().add(new CheckFaultInterceptor());
   
                // Add in a default selection interceptor
                newMO.getRoutingInterceptors().add(new EndpointSelectionInterceptor());
   
                newMO.getEndpoints().add(cio.getEndpoint());
   
                mo = newMO;
            }
   
            if (mo instanceof MultipleEndpointObserver) {
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.