Java Code Examples for org.apache.cxf.phase.Phase#POST_STREAM

The following examples show how to use org.apache.cxf.phase.Phase#POST_STREAM . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: cxf   File: RedeliveryQueueImpl.java    License: Apache License 2.0 5 votes vote down vote up
private void redeliver() throws Exception {
    LOG.log(Level.INFO, "Redelivering ... for " + (1 + retries));
    String restartingPhase;
    if (message.getContent(Exception.class) != null) {
        message.removeContent(Exception.class);
        message.getExchange().put(Exception.class, null);

        // clean-up message for redelivery
        closeStreamResources();
        message.removeContent(Node.class);
    }


    InputStream is = null;
    CachedOutputStream cos = (CachedOutputStream)message.get(RMMessageConstants.SAVED_CONTENT);
    is = cos.getInputStream();
    message.setContent(InputStream.class, is);
    message = message.getExchange().getEndpoint().getBinding().createMessage(message);
    restartingPhase = Phase.POST_STREAM;
    // skip some interceptor chain phases for redelivery
    InterceptorChain chain = getRedeliveryInterceptorChain(message, restartingPhase);
    ListIterator<Interceptor<? extends Message>> iterator = chain.getIterator();
    while (iterator.hasNext()) {
        Interceptor<? extends Message> incept = iterator.next();
        if (incept.getClass().getName().equals(RMCaptureInInterceptor.class.getName())) {
            chain.remove(incept);
        }
    }
    message.getExchange().setInMessage(message);
    message.setInterceptorChain(chain);
    chain.doIntercept(message);
    Exception ex = message.getContent(Exception.class);
    if (null != ex) {
        throw ex;
    }
}
 
Example 2
Source Project: cxf   File: MediatorInInterceptor.java    License: Apache License 2.0 4 votes vote down vote up
public MediatorInInterceptor() {
    super(Phase.POST_STREAM);
    addBefore(StaxInInterceptor.class.getName());
}
 
Example 3
Source Project: cxf   File: PolicyLoggingInterceptor.java    License: Apache License 2.0 4 votes vote down vote up
PolicyLoggingInterceptor(boolean o) {
    super(o ? Phase.POST_STREAM : Phase.POST_INVOKE);
}
 
Example 4
public XMLStreamReaderInInterceptor() {
    super(Phase.POST_STREAM);
}
 
Example 5
public PolicyVerificationOutInterceptor() {
    super(Phase.POST_STREAM);
}
 
Example 6
Source Project: cxf   File: RMCaptureInInterceptor.java    License: Apache License 2.0 4 votes vote down vote up
public RMCaptureInInterceptor() {
    super(Phase.POST_STREAM);
    addAfter(StaxInInterceptor.class.getName());
}
 
Example 7
Source Project: cxf   File: XmlSecInInterceptor.java    License: Apache License 2.0 4 votes vote down vote up
public XmlSecInInterceptor() {
    super(Phase.POST_STREAM);
    getAfter().add(StaxInInterceptor.class.getName());
}
 
Example 8
Source Project: cxf   File: JsonpPostStreamInterceptor.java    License: Apache License 2.0 4 votes vote down vote up
public JsonpPostStreamInterceptor() {
    super(Phase.POST_STREAM);
}
 
Example 9
Source Project: cxf   File: XSLTInInterceptor.java    License: Apache License 2.0 4 votes vote down vote up
public XSLTInInterceptor(String xsltPath) {
    super(Phase.POST_STREAM, StaxInInterceptor.class, null, xsltPath);
}
 
Example 10
public DepthRestrictingStreamInterceptor() {
    this(Phase.POST_STREAM);
    addAfter(StaxInInterceptor.class.getName());
}
 
Example 11
Source Project: cxf   File: TransformInInterceptor.java    License: Apache License 2.0 4 votes vote down vote up
public TransformInInterceptor() {
    this(Phase.POST_STREAM);
    addBefore(StaxInInterceptor.class.getName());
}
 
Example 12
Source Project: cxf   File: FIStaxInInterceptor.java    License: Apache License 2.0 4 votes vote down vote up
public FIStaxInInterceptor() {
    this(Phase.POST_STREAM);
}
 
Example 13
Source Project: cxf   File: StaxInInterceptor.java    License: Apache License 2.0 4 votes vote down vote up
public StaxInInterceptor() {
    super(Phase.POST_STREAM);
}