Examples of registerCallback()


Examples of org.apache.cxf.io.CacheAndWriteOutputStream.registerCallback()

                    }
                    if (limit > 0) {
                        newOut.setCacheLimit(limit);
                    }
                    message.setContent(OutputStream.class, newOut);
                    newOut.registerCallback(new LoggingCallback(logger, message, os));
                } else {
                    message.setContent(Writer.class, new LogWriter(logger, message, iowriter));
                }
            }
        }
View Full Code Here

Examples of org.apache.cxf.io.CacheAndWriteOutputStream.registerCallback()

                final CacheAndWriteOutputStream newOut = new CacheAndWriteOutputStream(os);
                if (threshold > 0) {
                    newOut.setThreshold(threshold);
                }
                message.setContent(OutputStream.class, newOut);
                newOut.registerCallback(new LoggingCallback(logger, message, os));
            }
        }
    }
   
    class LoggingCallback implements CachedOutputStreamCallback {
View Full Code Here

Examples of org.apache.cxf.io.CacheAndWriteOutputStream.registerCallback()

            }

            // Write the output while caching it for the log message
            final CacheAndWriteOutputStream newOut = new CacheAndWriteOutputStream(os);
            message.setContent(OutputStream.class, newOut);
            newOut.registerCallback(new PersistOutInterceptorCallback(message, os, exchangeData));

            exchangeData.setOutDate(new Date());

            if (message.getContent(Exception.class) != null) {
                exchangeData.setStatus("ERROR");
View Full Code Here

Examples of org.apache.cxf.io.CacheAndWriteOutputStream.registerCallback()

        if (LOG.isLoggable(Level.INFO) || writer != null) {
            // Write the output while caching it for the log message
            final CacheAndWriteOutputStream newOut = new CacheAndWriteOutputStream(os);
            message.setContent(OutputStream.class, newOut);
            newOut.registerCallback(new LoggingCallback(message, os));
        }
    }

    class LoggingCallback implements CachedOutputStreamCallback {
       
View Full Code Here

Examples of org.apache.cxf.io.CacheAndWriteOutputStream.registerCallback()

                    final CacheAndWriteOutputStream newOut = new CacheAndWriteOutputStream(os);
                    if (threshold > 0) {
                        newOut.setThreshold(threshold);
                    }
                    message.setContent(OutputStream.class, newOut);
                    newOut.registerCallback(new LoggingCallback(logger, message, os));
                } else {
                    message.setContent(Writer.class, new LogWriter(logger, message, iowriter));
                }
            }
        }
View Full Code Here

Examples of org.apache.cxf.io.CacheAndWriteOutputStream.registerCallback()

                    final CacheAndWriteOutputStream newOut = new CacheAndWriteOutputStream(os);
                    if (threshold > 0) {
                        newOut.setThreshold(threshold);
                    }
                    message.setContent(OutputStream.class, newOut);
                    newOut.registerCallback(new LoggingCallback(logger, message, os));
                } else {
                    message.setContent(Writer.class, new LogWriter(logger, message, iowriter));
                }
            }
        }
View Full Code Here

Examples of org.apache.cxf.io.CachedOutputStream.registerCallback()

    }

    protected void transformOS(Message message, OutputStream out) {
        CachedOutputStream wrapper = new CachedOutputStream();
        CachedOutputStreamCallback callback = new XSLTCachedOutputStreamCallback(getXSLTTemplate(), out);
        wrapper.registerCallback(callback);
        message.setContent(OutputStream.class, wrapper);
    }

    protected void transformWriter(Message message, Writer writer) {
        XSLTCachedWriter wrapper = new XSLTCachedWriter(getXSLTTemplate(), writer);
View Full Code Here

Examples of org.apache.cxf.io.WriteOnCloseOutputStream.registerCallback()

        if (null == os) {
            return;
        }

        WriteOnCloseOutputStream stream = RMUtils.createCachedStream(message, os);
        stream.registerCallback(new RecorderCallback());
    }
   
    public List<byte[]> getOutboundMessages() {
        return outbound;
    }
View Full Code Here

Examples of org.apache.cxf.io.WriteOnCloseOutputStream.registerCallback()

                    } else {
                        woc = new WriteOnCloseOutputStream(os);
                        message.setContent(OutputStream.class, woc);
                    }
                    for (CachedOutputStreamCallback cb: callbacks) {
                        woc.registerCallback(cb);
                    }
                }
            }
           
            // send the message
View Full Code Here

Examples of org.apache.cxf.io.WriteOnCloseOutputStream.registerCallback()

        if (null == os) {
            return;
        }

        WriteOnCloseOutputStream stream = RMUtils.createCachedStream(message, os);
        stream.registerCallback(new RecorderCallback());
    }
   
    public List<byte[]> getOutboundMessages() {
        return outbound;
    }
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.