Package eu.tneitzel.rmg.plugin
Class ReturnValueProvider
- java.lang.Object
-
- eu.tneitzel.rmg.plugin.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 Summary
Constructors Constructor Description ReturnValueProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetValue()Obtain the currently set value.voidhandleResponse(Object responseObject)Just store the return value within a static class variable.
-
-
-
Method Detail
-
handleResponse
public void handleResponse(Object responseObject)
Just store the return value within a static class variable.- Specified by:
handleResponsein interfaceIResponseHandler- Parameters:
responseObject- object returned by the RMI call
-
getValue
public Object getValue()
Obtain the currently set value.- Returns:
- currently saved response object
-
-