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 IConverterconverterJsonprotected static java.lang.StringENCODINGprotected java.io.FilesocketFile
-
Constructor Summary
Constructors Constructor Description UnixDomainSocketRpc(java.lang.String pathSocket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.lang.ObjectdoCall(IWrapperSocketCall wrapperSocket, java.lang.reflect.Type typeResult)Make a raw call to the socket without JSON parsingjava.lang.StringdoRawCall(IWrapperSocketCall wrapperSocket)Make a raw call to the socket without JSON parsingintgetReceiveBufferSize()booleanisOpen()<T> TmakeCall(IWrapperSocketCall request)<T> TmakeCall(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:
getReceiveBufferSizein interfaceISocket- Throws:
java.net.SocketException
-
close
public void close() throws ServiceException- Specified by:
closein interfaceISocket- Throws:
ServiceException
-
doCall
public java.lang.Object doCall(IWrapperSocketCall wrapperSocket, java.lang.reflect.Type typeResult) throws ServiceException
Description copied from interface:ISocketMake a raw call to the socket without JSON parsing- Specified by:
doCallin 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:
makeCallin interfaceISocket- Throws:
ServiceException
-
makeCall
public <T> T makeCall(IWrapperSocketCall request) throws ServiceException
- Specified by:
makeCallin interfaceISocket- Throws:
ServiceException
-
doRawCall
public java.lang.String doRawCall(IWrapperSocketCall wrapperSocket) throws java.io.IOException
Description copied from interface:ISocketMake a raw call to the socket without JSON parsing
-
-