Interface CodecContext


public interface CodecContext
Context supplied to value codecs for remote-reference conversion.

Implementations are thread-safe and owned by a runtime or transport call. Codecs must not retain context instances beyond the call that supplied them.

  • Method Summary

    Modifier and Type
    Method
    Description
    proxyFor(ObjectRef ref, Class<?> expectedType)
    Converts an inbound reference to a local instance or proxy.
    referenceFor(Object value, Class<?> declaredType)
    Returns an existing remote reference for a value or exports it when policy allows.
  • Method Details

    • referenceFor

      Optional<ObjectRef> referenceFor(Object value, Class<?> declaredType)
      Returns an existing remote reference for a value or exports it when policy allows.
      Parameters:
      value - value being encoded
      declaredType - method-declared Java type
      Returns:
      reference when the value should travel by reference
    • proxyFor

      Object proxyFor(ObjectRef ref, Class<?> expectedType)
      Converts an inbound reference to a local instance or proxy.
      Parameters:
      ref - inbound object reference
      expectedType - method-declared Java type
      Returns:
      object implementing the expected type