Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2005-2011 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *     http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.ws.server.endpoint.interceptor;
Implementation of the org.springframework.ws.server.SmartEndpointInterceptor interface that delegates to a delegate org.springframework.ws.server.EndpointInterceptor.

Author(s):
Arjen Poutsma
Since:
2.0
    private final EndpointInterceptor delegate;

    
Creates a new instance of the DelegatingSmartEndpointInterceptor with the given delegate.

Parameters:
delegate the endpoint interceptor to delegate to.
        Assert.notNull(delegate"'delegate' must not be null");
        this. = delegate;
    }

    
Returns the delegate.

Returns:
the delegate
    public EndpointInterceptor getDelegate() {
        return ;
    }

    
    public boolean shouldIntercept(MessageContext messageContextObject endpoint) {
        WebServiceMessage request = messageContext.getRequest();
        return request != null && shouldIntercept(requestendpoint);
    }

    
Indicates whether this interceptor should intercept the given request message.

This implementation always returns true.

Parameters:
request the request message
endpoint chosen endpoint to invoke
Returns:
true to indicate that this interceptor applies; false otherwise
    protected boolean shouldIntercept(WebServiceMessage requestObject endpoint) {
        return true;
    }
    public boolean handleRequest(MessageContext messageContextObject endpointthrows Exception {
        return getDelegate().handleRequest(messageContextendpoint);
    }
    public boolean handleResponse(MessageContext messageContextObject endpointthrows Exception {
        return getDelegate().handleResponse(messageContextendpoint);
    }
    public boolean handleFault(MessageContext messageContextObject endpointthrows Exception {
        return getDelegate().handleFault(messageContextendpoint);
    }
    public void afterCompletion(MessageContext messageContextObject endpointException exthrows Exception {
        getDelegate().afterCompletion(messageContextendpointex);
    }
New to GrepCode? Check out our FAQ X