Interface InputOutputProcessingHandler

  • All Known Implementing Classes:
    InputOutputProcessingHandlerImpl

    public interface InputOutputProcessingHandler
    Processes parameters when sending data between the server and the clients
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String FROM_CLIENT_BEAN_ATTR
      Bean boolean attribute used to mark a bean as already processed from/to client to avoid process twice.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> Pair<T,​com.fasterxml.jackson.databind.JsonNode> processFromClient​(T object, boolean logJson)
      Recursively processes the object received from a client
      Pair<Object[],​com.fasterxml.jackson.databind.JsonNode> processMethodParameters​(Method method, Object[] parameterValues, boolean logJson)
      Recursively processes the parameters of the given method call from a client
      <T> Pair<T,​com.fasterxml.jackson.databind.JsonNode> processMethodResult​(Method method, T result, boolean logJson)
      Recursively processes the result of the given method call
      com.fasterxml.jackson.databind.JsonNode processSensitiveMethodParameters​(Method method, com.fasterxml.jackson.databind.JsonNode jsonNode)
      Masks any sensitive parameter value present in the given JsonNode only if it's an instance of ArrayNode.
      <T> Pair<T,​com.fasterxml.jackson.databind.JsonNode> processToClient​(T object, boolean logJson)
      Recursively processes the given object to send to a client
      void restore​(Object... values)
      Restores each bean to the original state.
    • Field Detail

      • FROM_CLIENT_BEAN_ATTR

        static final String FROM_CLIENT_BEAN_ATTR
        Bean boolean attribute used to mark a bean as already processed from/to client to avoid process twice.
        See Also:
        Constant Field Values
    • Method Detail

      • processFromClient

        <T> Pair<T,​com.fasterxml.jackson.databind.JsonNode> processFromClient​(T object,
                                                                                    boolean logJson)
        Recursively processes the object received from a client
        Parameters:
        object - The object to process
        logJson - If true, the second pair value will be a JsonNode to show in the log as parameter
      • processMethodParameters

        Pair<Object[],​com.fasterxml.jackson.databind.JsonNode> processMethodParameters​(Method method,
                                                                                             Object[] parameterValues,
                                                                                             boolean logJson)
        Recursively processes the parameters of the given method call from a client
        Parameters:
        result - The method's parameters
        logJson - If true, the second pair value will be a JsonNode to show in the log as result
      • processMethodResult

        <T> Pair<T,​com.fasterxml.jackson.databind.JsonNode> processMethodResult​(Method method,
                                                                                      T result,
                                                                                      boolean logJson)
        Recursively processes the result of the given method call
        Parameters:
        result - The method result
        logJson - If true, the second pair value will be a JsonNode to show in the log as result
      • processSensitiveMethodParameters

        com.fasterxml.jackson.databind.JsonNode processSensitiveMethodParameters​(Method method,
                                                                                 com.fasterxml.jackson.databind.JsonNode jsonNode)
        Masks any sensitive parameter value present in the given JsonNode only if it's an instance of ArrayNode. Any parameter annotated with MaskValueInLog is considered a sensitive one.
        The same (but modified) JsonNode instance is returned.
      • processToClient

        <T> Pair<T,​com.fasterxml.jackson.databind.JsonNode> processToClient​(T object,
                                                                                  boolean logJson)
        Recursively processes the given object to send to a client
        Parameters:
        object - The object to process
        logJson - If true, the second pair value will be a JsonNode to show in the log as result
      • restore

        void restore​(Object... values)
        Restores each bean to the original state. This is called in case of retrying the operation.