Class ReturnValueProvider

  • All Implemented Interfaces:
    IResponseHandler

    public class ReturnValueProvider
    extends Object
    implements IResponseHandler
    ReturnValueProvider is a helper class that can be used to capture return values of custom RMI calls. Normally these return values are ignored and users can define a custom IResponseHandler to process it. For some use cases (e.g. spring remoting) remote-method-guesser also requires access to return values. This can be achieved by temporarily using this provider, that stores the return value of a call within a static variable.
    Author:
    Tobias Neitzel (@qtc_de)
    • Constructor Detail

      • ReturnValueProvider

        public ReturnValueProvider()
    • Method Detail

      • handleResponse

        public void handleResponse​(Object responseObject)
        Just store the return value within a static class variable.
        Specified by:
        handleResponse in interface IResponseHandler
        Parameters:
        responseObject - object returned by the RMI call
      • getValue

        public Object getValue()
        Obtain the currently set value.
        Returns:
        currently saved response object