Class Context

    • Field Detail

      • log

        protected final Log log
      • nettyContext

        public final io.netty.channel.ChannelHandlerContext nettyContext
        The Netty request context for an RPC call. In general RPC implementation should avoid using this object. It is exposed only because we need it for some HTTP-specific functionalities that are not covered by our RPC implementation (e.g. http chunking)
      • api

        protected final org.yamcs.api.Api<Context> api
      • user

        public final User user
        The request user.
      • txSize

        protected long txSize
      • statusCode

        protected int statusCode
    • Method Detail

      • getApi

        public org.yamcs.api.Api<Context> getApi()
      • getMethod

        public abstract com.google.protobuf.Descriptors.MethodDescriptor getMethod()
      • isServerStreaming

        public boolean isServerStreaming()
      • isClientStreaming

        public boolean isClientStreaming()
      • getRequestPrototype

        public com.google.protobuf.Message getRequestPrototype()
      • getResponsePrototype

        public com.google.protobuf.Message getResponsePrototype()
      • parseJson

        public void parseJson​(String json,
                              com.google.protobuf.Message.Builder builder)
                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • printJson

        public String printJson​(com.google.protobuf.Message message)
                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • getTransferredSize

        public long getTransferredSize()
        Get the number of bytes transferred as the result of this call. It should not include the http headers. Note that the number might be increased before the data is sent so it will be wrong if there was an error sending data.
        Returns:
        number of bytes transferred as part of the request
      • addTransferredSize

        public void addTransferredSize​(long byteCount)
      • getStatusCode

        public int getStatusCode()
      • reportStatusCode

        public void reportStatusCode​(int statusCode)
      • getClientAddress

        public String getClientAddress()
      • getId

        public int getId()