Class 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 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 RemoteInvocation
        candidate - 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.
        Overrides:
        equals in class Object
        Parameters:
        other - Object to compare with
        Returns:
        true if the objects can be considered the same
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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