class CodecContext implements SimpleTransparentMessageCodec.Codec {
        private final ScriptFactory factory;
        private Function<SimpleTransparentMessageCodec.EncodeContext, Object> encoder;
        private Function<SimpleTransparentMessageCodec.DecodeContext, Object> decoder;

        public void onDownstream(Function<SimpleTransparentMessageCodec.EncodeContext, Object> encoder) {
            this.encoder = encoder;
        }

        public void onUpstream(Function<SimpleTransparentMessageCodec.DecodeContext, Object> decoder) {
            this.decoder = decoder;
        }

        @Override
        public Object decode(SimpleTransparentMessageCodec.DecodeContext context) {
            if (decoder == null) {
                return null;
            }
            return factory.convertToJavaType(decoder.apply(context));
        }

        @Override
        public Object encode(SimpleTransparentMessageCodec.EncodeContext context) {<FILL_FUNCTION_BODY>}

    }

            if (encoder == null) {
                return null;
            }
            return factory.convertToJavaType(encoder.apply(context));
        
<no_super_class>