Spring Web Services Framework

org.springframework.ws.server.endpoint
Class MethodEndpoint

java.lang.Object
  

extended by org.springframework.ws.server.endpoint.MethodEndpoint

public final class MethodEndpoint
extends Object

Represents a bean method that will be invoked as part of an incoming Web service message.

Consists of a Method, and a bean Object.

Since:
1.0.0
Author:
Arjen Poutsma

Constructor Summary
MethodEndpoint(Object bean, Method method)
          Constructs a new method endpoint with the given bean and method.
MethodEndpoint(Object bean, String methodName, Class<?>... parameterTypes)
          Constructs a new method endpoint with the given bean, method name and parameters.
MethodEndpoint(String beanName, BeanFactory beanFactory, Method method)
          Constructs a new method endpoint with the given bean name and method.
 
Method Summary
 boolean equals(Object o)
           
 Object getBean()
          Returns the object bean for this method endpoint.
 Method getMethod()
          Returns the method for this method endpoint.
 MethodParameter[] getMethodParameters()
          Returns the method parameters for this method endpoint.
 MethodParameter getReturnType()
          Returns the method return type, as MethodParameter.
 int hashCode()
           
 Object invoke(Object... args)
          Invokes this method endpoint with the given arguments.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodEndpoint

public MethodEndpoint(Object bean,
                      Method method)
Constructs a new method endpoint with the given bean and method.

Parameters:
bean - the object bean
method - the method

MethodEndpoint

public MethodEndpoint(Object bean,
                      String methodName,
                      Class<?>... parameterTypes)
               throws NoSuchMethodException
Constructs a new method endpoint with the given bean, method name and parameters.

Parameters:
bean - the object bean
methodName - the method name
parameterTypes - the method parameter types
Throws:
NoSuchMethodException - when the method cannot be found

MethodEndpoint

public MethodEndpoint(String beanName,
                      BeanFactory beanFactory,
                      Method method)
Constructs a new method endpoint with the given bean name and method. The bean name will be lazily initialized when invoke(Object...) is called.

Parameters:
beanName - the bean name
beanFactory - the bean factory to use for bean initialization
method - the method
Method Detail

getBean

public Object getBean()
Returns the object bean for this method endpoint.


getMethod

public Method getMethod()
Returns the method for this method endpoint.


getMethodParameters

public MethodParameter[] getMethodParameters()
Returns the method parameters for this method endpoint.


getReturnType

public MethodParameter getReturnType()
Returns the method return type, as MethodParameter.


invoke

public Object invoke(Object... args)
              throws Exception
Invokes this method endpoint with the given arguments.

Parameters:
args - the arguments
Returns:
the invocation result
Throws:
Exception - when the method invocation results in an exception

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

Spring Web Services Framework

Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.