Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2005-2010 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.adapter;
Abstract base class for org.springframework.ws.server.EndpointAdapter implementations that support org.springframework.ws.server.endpoint.MethodEndpoints. Contains template methods for handling these method endpoints.

Author(s):
Arjen Poutsma
Since:
1.0.0
public abstract class AbstractMethodEndpointAdapter extends TransformerObjectSupport implements EndpointAdapter {

    
Delegates to supportsInternal(org.springframework.ws.server.endpoint.MethodEndpoint).

Parameters:
endpoint endpoint object to check
Returns:
whether or not this adapter can adapt the given endpoint
    public final boolean supports(Object endpoint) {
        return endpoint instanceof MethodEndpoint && supportsInternal((MethodEndpointendpoint);
    }

    
Delegates to invokeInternal(org.springframework.ws.context.MessageContext,org.springframework.ws.server.endpoint.MethodEndpoint).

Parameters:
messageContext the current message context
endpoint the endpoint to use. This object must have previously been passed to the supportsInternal method of this interface, which must have returned true
Throws:
java.lang.Exception in case of errors
    public final void invoke(MessageContext messageContextObject endpointthrows Exception {
        invokeInternal(messageContext, (MethodEndpointendpoint);
    }

    
Given a method endpoint, return whether or not this adapter can support it.

Parameters:
methodEndpoint method endpoint to check
Returns:
whether or not this adapter can adapt the given method
    protected abstract boolean supportsInternal(MethodEndpoint methodEndpoint);

    
Use the given method endpoint to handle the request.

Parameters:
messageContext the current message context
methodEndpoint the method endpoint to use
Throws:
java.lang.Exception in case of errors
    protected abstract void invokeInternal(MessageContext messageContextMethodEndpoint methodEndpoint)
            throws Exception;
New to GrepCode? Check out our FAQ X