Package eu.tneitzel.rmg.utils
Class RemoteInvocationHolder
- java.lang.Object
-
- eu.tneitzel.rmg.utils.RemoteInvocationHolder
-
public class RemoteInvocationHolder extends Object
RemoteInvocation objects do not contain all information that MethodCandidates contain. When converting a MethodCandidate to a RemoteInvocation, information like the signature or the return value get lost. Moreover, two RemoteInvocations can be considered the same when they have a similar name and similar method arguments. The return value does not matter. The RemoteInvocationHolder class is designed to overcome these problems. It tracks the associated MethodCandidate to each RemoteInvocation and implements methods that allow to compare RemoteInvocations and to filter duplicates.- Author:
- Tobias Neitzel (@qtc_de)
-
-
Constructor Summary
Constructors Constructor Description RemoteInvocationHolder(org.springframework.remoting.support.RemoteInvocation invo, MethodCandidate candidate)An RemoteInvocationWrapper simply contains a RemoteInvocation and the associated MethodCandidate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)Two RemoteInocationHolders are the same, if their contained RemoteInvocation uses the same method name and the same argument types.MethodCandidategetCandidate()org.springframework.remoting.support.RemoteInvocationgetInvo()StringgetName()Class<?>[]getTypes()inthashCode()
-
-
-
Constructor Detail
-
RemoteInvocationHolder
public RemoteInvocationHolder(org.springframework.remoting.support.RemoteInvocation invo, MethodCandidate candidate)An RemoteInvocationWrapper simply contains a RemoteInvocation and the associated MethodCandidate.- Parameters:
invo- the RemoteInvocationcandidate- the associated MethodCandidate
-
-
Method Detail
-
equals
public boolean equals(Object other)
Two RemoteInocationHolders are the same, if their contained RemoteInvocation uses the same method name and the same argument types.
-
getName
public String getName()
- Returns:
- name of the method
-
getTypes
public Class<?>[] getTypes()
- Returns:
- parameter types of the method
-
getCandidate
public MethodCandidate getCandidate()
- Returns:
- MethodCandidate associated with the method
-
getInvo
public org.springframework.remoting.support.RemoteInvocation getInvo()
- Returns:
- RemoteInvocation associated with the method
-
-