Module methanol

Class ForwardingBodyAdapter

java.lang.Object
com.github.mizosoft.methanol.adapter.ForwardingBodyAdapter
All Implemented Interfaces:
BodyAdapter
Direct Known Subclasses:
ForwardingDecoder, ForwardingEncoder

public abstract class ForwardingBodyAdapter extends Object implements BodyAdapter
A BodyAdapter that forwards calls to another.
  • Constructor Details

    • ForwardingBodyAdapter

      protected ForwardingBodyAdapter()
  • Method Details

    • delegate

      protected abstract BodyAdapter delegate()
      Returns the adapter calls are being forwarded to.
    • isCompatibleWith

      public boolean isCompatibleWith(MediaType mediaType)
      Description copied from interface: BodyAdapter
      Returns true if the format this adapter uses is compatible with the given media type.
      Specified by:
      isCompatibleWith in interface BodyAdapter
    • supportsType

      public boolean supportsType(TypeRef<?> type)
      Description copied from interface: BodyAdapter
      Returns true if this adapter supports the given type.
      Specified by:
      supportsType in interface BodyAdapter