Package jrpc.service.socket
Class UnixDomainSocketRpc
- java.lang.Object
-
- jrpc.service.socket.UnixDomainSocketRpc
-
- All Implemented Interfaces:
ISocket
- Direct Known Subclasses:
CLightningSocket
public abstract class UnixDomainSocketRpc extends java.lang.Object implements ISocket
-
-
Field Summary
Fields Modifier and Type Field Description protected IConverter
converterJson
protected static java.lang.String
ENCODING
protected java.io.File
socketFile
-
Constructor Summary
Constructors Constructor Description UnixDomainSocketRpc(java.lang.String pathSocket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.lang.Object
doCall(IWrapperSocketCall wrapperSocket, java.lang.reflect.Type typeResult)
Make a raw call to the socket without JSON parsingjava.lang.String
doRawCall(IWrapperSocketCall wrapperSocket)
Make a raw call to the socket without JSON parsingint
getReceiveBufferSize()
boolean
isOpen()
<T> T
makeCall(IWrapperSocketCall request)
<T> T
makeCall(IWrapperSocketCall request, java.lang.Class<T> typeResult)
-
-
-
Field Detail
-
ENCODING
protected static final java.lang.String ENCODING
-
converterJson
protected IConverter converterJson
-
socketFile
protected java.io.File socketFile
-
-
Method Detail
-
getReceiveBufferSize
public int getReceiveBufferSize() throws java.net.SocketException
- Specified by:
getReceiveBufferSize
in interfaceISocket
- Throws:
java.net.SocketException
-
close
public void close() throws ServiceException
- Specified by:
close
in interfaceISocket
- Throws:
ServiceException
-
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 interfaceISocket
- 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
-
makeCall
public <T> T makeCall(IWrapperSocketCall request, java.lang.Class<T> typeResult) throws ServiceException
- Specified by:
makeCall
in interfaceISocket
- Throws:
ServiceException
-
makeCall
public <T> T makeCall(IWrapperSocketCall request) throws ServiceException
- Specified by:
makeCall
in interfaceISocket
- 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
-
-