类 AbstractHessianInput

  • 直接已知子类:
    Hessian2Input, HessianInput

    public abstract class AbstractHessianInput
    extends 
    Abstract base class for Hessian requests. Hessian users should only need to use the methods in this class.

     AbstractHessianInput in = ...; // get input
     String value;
    
     in.startReply();         // read reply header
     value = in.readString(); // read string value
     in.completeReply();      // read reply footer
     
    • 方法概要

      所有方法 实例方法 抽象方法 具体方法 
      修饰符和类型 方法 说明
      abstract int  obj)
      Adds an object reference.
      abstract boolean checkAndReadNull()  
      void close()  
      abstract void completeCall()
      Completes reading the call
      abstract void completeReply()
      Completes reading the call
      abstract getMethod()
      Returns the call's method
      abstract getReader()
      Starts reading a string.
      HessianRemoteResolver getRemoteResolver()
      Sets the resolver used to lookup remote objects.
      void  is)
      Initialize the Hessian stream with the underlying input stream.
      abstract boolean isEnd()
      Returns true if the data has ended.
      abstract boolean readBoolean()
      Reads a boolean
      abstract byte[] readBytes()
      Reads a byte array.
      abstract int readCall()
      Reads the call
      abstract double readDouble()
      Reads a double.
      abstract void readEnd()
      Read the end byte
      abstract readHeader()
      Reads a header, returning null if there are no headers.
      abstract readInputStream()
      Starts reading a byte array using an input stream.
      abstract int readInt()
      Reads an integer
      abstract int readLength()
      Reads the length of a list.
      abstract void readListEnd()
      Read the end byte
      abstract int readListStart()
      Reads the start of a list
      abstract long readLong()
      Reads a long
      abstract void readMapEnd()
      Read the end byte
      abstract int readMapStart()
      Reads the start of a map
      abstract readMethod()
      Starts reading the call
      int readMethodArgLength()
      Reads the number of method arguments
      readNode()
      Reads an XML node encoded in UTF-8
      abstract void readNull()
      Reads a null
      abstract readObject()
      Reads an arbitrary object from the input stream.
      abstract  expectedClass)
      Reads an arbitrary object from the input stream.
       expectedClass, <?>... expectedTypes)
      Reads an arbitrary object from the input stream.
      <<?>> expectedTypes)
      Reads an arbitrary object from the input stream.
      abstract readRef()
      Reads a reference
      abstract readRemote()
      Reads a remote object reference to the stream.
      abstract  expectedClass)
      Reads a reply as an object.
      abstract readString()
      Reads a string encoded in UTF-8
      abstract readType()
      Reads an object type.
      abstract long readUTCDate()
      Reads a date.
      void resetReferences()
      Resets the references for streaming.
      abstract void setRef​(int i,  obj)
      Sets an object reference.
      void setRemoteResolver​(HessianRemoteResolver resolver)
      Sets the resolver used to lookup remote objects.
      void setSerializerFactory​(SerializerFactory ser)
      Sets the serializer factory.
      void skipOptionalCall()
      For backward compatibility with HessianSkeleton
      abstract void startCall()
      Starts reading the call, including the headers.
      abstract void startReply()
      Starts reading the reply
      • 从类继承的方法 java.lang.

        , , , , , , , ,
    • 构造器详细资料

      • AbstractHessianInput

        public AbstractHessianInput()
    • 方法详细资料

      • init

        public void init​( is)
        Initialize the Hessian stream with the underlying input stream.
      • getMethod

        public abstract  getMethod()
        Returns the call's method
      • getRemoteResolver

        public HessianRemoteResolver getRemoteResolver()
        Sets the resolver used to lookup remote objects.
      • setRemoteResolver

        public void setRemoteResolver​(HessianRemoteResolver resolver)
        Sets the resolver used to lookup remote objects.
      • setSerializerFactory

        public void setSerializerFactory​(SerializerFactory ser)
        Sets the serializer factory.
      • checkAndReadNull

        public abstract boolean checkAndReadNull()
      • readCall

        public abstract int readCall()
                              throws 
        Reads the call

         c major minor
         
        抛出:
      • skipOptionalCall

        public void skipOptionalCall()
                              throws 
        For backward compatibility with HessianSkeleton
        抛出:
      • readHeader

        public abstract  readHeader()
                                   throws 
        Reads a header, returning null if there are no headers.

         H b16 b8 value
         
        抛出:
      • readMethod

        public abstract  readMethod()
                                   throws 
        Starts reading the call

        A successful completion will have a single value:

         m b16 b8 method
         
        抛出:
      • readMethodArgLength

        public int readMethodArgLength()
                                throws 
        Reads the number of method arguments
        返回:
        -1 for a variable length (hessian 1.0)
        抛出:
      • startCall

        public abstract void startCall()
                                throws 
        Starts reading the call, including the headers.

        The call expects the following protocol data

         c major minor
         m b16 b8 method
         
        抛出:
      • completeCall

        public abstract void completeCall()
                                   throws 
        Completes reading the call

        The call expects the following protocol data

         Z
         
        抛出:
      • readReply

        public abstract  readReply​( expectedClass)
                                  throws 
        Reads a reply as an object. If the reply has a fault, throws the exception.
        抛出:
      • startReply

        public abstract void startReply()
                                 throws 
        Starts reading the reply

        A successful completion will have a single value:

         r
         v
         
        抛出:
      • completeReply

        public abstract void completeReply()
                                    throws 
        Completes reading the call

        A successful completion will have a single value:

         z
         
        抛出:
      • readBoolean

        public abstract boolean readBoolean()
                                     throws 
        Reads a boolean

         T
         F
         
        抛出:
      • readNull

        public abstract void readNull()
                               throws 
        Reads a null

         N
         
        抛出:
      • readInt

        public abstract int readInt()
                             throws 
        Reads an integer

         I b32 b24 b16 b8
         
        抛出:
      • readLong

        public abstract long readLong()
                               throws 
        Reads a long

         L b64 b56 b48 b40 b32 b24 b16 b8
         
        抛出:
      • readDouble

        public abstract double readDouble()
                                   throws 
        Reads a double.

         D b64 b56 b48 b40 b32 b24 b16 b8
         
        抛出:
      • readUTCDate

        public abstract long readUTCDate()
                                  throws 
        Reads a date.

         T b64 b56 b48 b40 b32 b24 b16 b8
         
        抛出:
      • readString

        public abstract  readString()
                                   throws 
        Reads a string encoded in UTF-8

         s b16 b8 non-final string chunk
         S b16 b8 final string chunk
         
        抛出:
      • readNode

        public  readNode()
                      throws 
        Reads an XML node encoded in UTF-8

         x b16 b8 non-final xml chunk
         X b16 b8 final xml chunk
         
        抛出:
      • getReader

        public abstract  getReader()
                                  throws 
        Starts reading a string. All the characters must be read before calling the next method. The actual characters will be read with the reader's read() or read(char [], int, int).

         s b16 b8 non-final string chunk
         S b16 b8 final string chunk
         
        抛出:
      • readInputStream

        public abstract  readInputStream()
                                             throws 
        Starts reading a byte array using an input stream. All the bytes must be read before calling the following method.

         b b16 b8 non-final binary chunk
         B b16 b8 final binary chunk
         
        抛出:
      • readBytes

        public abstract byte[] readBytes()
                                  throws 
        Reads a byte array.

         b b16 b8 non-final binary chunk
         B b16 b8 final binary chunk
         
        抛出:
      • readObject

        public abstract  readObject​( expectedClass)
                                   throws 
        Reads an arbitrary object from the input stream.
        参数:
        expectedClass - the expected class if the protocol doesn't supply it.
        抛出:
      • readObject

        public  readObject​( expectedClass,
                                 <?>... expectedTypes)
                          throws 
        Reads an arbitrary object from the input stream.
        参数:
        expectedClass - the expected class if the protocol doesn't supply it.
        expectedTypes - the runtime type hints, eg: expectedClass equals Map, expectedTypes can equals String.class, Short.class
        抛出:
      • readObject

        public abstract  readObject()
                                   throws 
        Reads an arbitrary object from the input stream.
        抛出:
      • readObject

        public  readObject​(<<?>> expectedTypes)
                          throws 
        Reads an arbitrary object from the input stream.
        参数:
        expectedTypes - the runtime type hints, eg: expectedTypes can equals String.class, Short.class for HashMap
        抛出:
      • readRemote

        public abstract  readRemote()
                                   throws 
        Reads a remote object reference to the stream. The type is the type of the remote interface.

         'r' 't' b16 b8 type url
         
        抛出:
      • readRef

        public abstract  readRef()
                                throws 
        Reads a reference

         R b32 b24 b16 b8
         
        抛出:
      • addRef

        public abstract int addRef​( obj)
                            throws 
        Adds an object reference.
        抛出:
      • setRef

        public abstract void setRef​(int i,
                                     obj)
                             throws 
        Sets an object reference.
        抛出:
      • resetReferences

        public void resetReferences()
        Resets the references for streaming.
      • readListStart

        public abstract int readListStart()
                                   throws 
        Reads the start of a list
        抛出:
      • readLength

        public abstract int readLength()
                                throws 
        Reads the length of a list.
        抛出:
      • readMapStart

        public abstract int readMapStart()
                                  throws 
        Reads the start of a map
        抛出:
      • readType

        public abstract  readType()
                                 throws 
        Reads an object type.
        抛出:
      • isEnd

        public abstract boolean isEnd()
                               throws 
        Returns true if the data has ended.
        抛出:
      • readEnd

        public abstract void readEnd()
                              throws 
        Read the end byte
        抛出:
      • readMapEnd

        public abstract void readMapEnd()
                                 throws 
        Read the end byte
        抛出:
      • readListEnd

        public abstract void readListEnd()
                                  throws 
        Read the end byte
        抛出:
      • close

        public void close()
                   throws 
        抛出: