Class UnixDomainSocketRpc

  • All Implemented Interfaces:
    ISocket
    Direct Known Subclasses:
    CLightningSocket

    public abstract class UnixDomainSocketRpc
    extends java.lang.Object
    implements ISocket
    • Field Detail

      • ENCODING

        protected static final java.lang.String ENCODING
      • converterJson

        protected IConverter converterJson
      • socketFile

        protected java.io.File socketFile
    • Constructor Detail

      • UnixDomainSocketRpc

        public UnixDomainSocketRpc​(java.lang.String pathSocket)
    • Method Detail

      • getReceiveBufferSize

        public int getReceiveBufferSize()
                                 throws java.net.SocketException
        Specified by:
        getReceiveBufferSize in interface ISocket
        Throws:
        java.net.SocketException
      • isOpen

        public boolean isOpen()
        Specified by:
        isOpen in interface ISocket
      • doCall

        public java.lang.Object doCall​(IWrapperSocketCall wrapperSocket,
                                       java.lang.reflect.Type typeResult)
                                throws ServiceException
        Description copied from interface: ISocket
        Make a raw call to the socket without JSON parsing
        Specified by:
        doCall in interface ISocket
        Parameters:
        wrapperSocket - : The Payload to encoding and send throw the socket.
        typeResult - : The type result where the JSON payload will be encoded
        Returns:
        Object of the required type build with the JSON string content.
        Throws:
        ServiceException
      • doRawCall

        public java.lang.String doRawCall​(IWrapperSocketCall wrapperSocket)
                                   throws java.io.IOException
        Description copied from interface: ISocket
        Make a raw call to the socket without JSON parsing
        Specified by:
        doRawCall in interface ISocket
        Parameters:
        wrapperSocket - : The Payload to encoding and send throw the socket.
        Returns:
        A raw JSON string
        Throws:
        java.net.SocketException - Throws if any error with the socket will happen.
        java.io.IOException