T - The call type class, typically string, numbers and enums.public class IPCClient<T>
The IPC Client class send messages to IPC server can execute callback when response was received.
| Modifier and Type | Class and Description |
|---|---|
static class |
IPCClient.Companion |
| Modifier and Type | Field and Description |
|---|---|
static IPCClient.Companion |
Companion |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close IPC client and release all related resources..
|
java.lang.String |
getSessionId() |
boolean |
isConnected()
Check connection is well.
|
void |
send(RequestType<T> type,
Body body,
kotlin.jvm.functions.Function1<? super ketty.common.Packet<error.NonExistentClass>,? extends java.lang.Object> callback)
Send request packet to server.
|
void |
send(RequestType<T> type,
Body body,
Callback callback)
Send request packet to server.
|
void |
send(RequestType<T> type,
io.netty.buffer.ByteBuf data,
kotlin.jvm.functions.Function1<? super ketty.common.Packet<error.NonExistentClass>,? extends java.lang.Object> callback)
Send request packet to server.
|
void |
send(RequestType<T> type,
io.netty.buffer.ByteBuf data,
Callback callback)
Send request packet to server.
|
void |
send(RequestType<T> type,
java.nio.ByteBuffer data,
kotlin.jvm.functions.Function1<? super ketty.common.Packet<error.NonExistentClass>,? extends java.lang.Object> callback)
Send request packet to server.
|
void |
send(RequestType<T> type,
java.nio.ByteBuffer data,
Callback callback)
Send request packet to server.
|
void |
send(RequestType<T> type,
byte[] data,
kotlin.jvm.functions.Function1<? super ketty.common.Packet<error.NonExistentClass>,? extends java.lang.Object> callback)
Send request packet to server.
|
void |
send(RequestType<T> type,
byte[] data,
Callback callback)
Send request packet to server.
|
java.util.concurrent.Future<ketty.common.Packet> |
send(RequestType<T> type,
Body body)
Send request packet to server.
|
java.util.concurrent.Future<ketty.common.Packet> |
send(RequestType<T> type,
io.netty.buffer.ByteBuf data)
Send request packet to server.
|
java.util.concurrent.Future<ketty.common.Packet> |
send(RequestType<T> type,
java.nio.ByteBuffer data)
Send request packet to server.
|
java.util.concurrent.Future<ketty.common.Packet> |
send(RequestType<T> type,
byte[] data)
Send request packet to server.
|
Packet<NonExistentClass> |
sendSync(RequestType<T> type,
Body body)
Send request packet to server.
|
Packet<NonExistentClass> |
sendSync(RequestType<T> type,
io.netty.buffer.ByteBuf data)
Send request packet to server.
|
Packet<NonExistentClass> |
sendSync(RequestType<T> type,
java.nio.ByteBuffer data)
Send request packet to server.
|
Packet<NonExistentClass> |
sendSync(RequestType<T> type,
byte[] data)
Send request packet to server.
|
public static IPCClient.Companion Companion
public java.lang.String getSessionId()
public void send(RequestType<T> type, Body body, kotlin.jvm.functions.Function1<? super ketty.common.Packet<error.NonExistentClass>,? extends java.lang.Object> callback)
Send request packet to server.
type - call typebody - request bodycallback - code block to handle response packetpublic void send(RequestType<T> type, Body body, Callback callback)
Send request packet to server.
type - call typebody - request bodycallback - code block to handle response packetpublic void send(RequestType<T> type, io.netty.buffer.ByteBuf data, kotlin.jvm.functions.Function1<? super ketty.common.Packet<error.NonExistentClass>,? extends java.lang.Object> callback)
Send request packet to server.
type - call typedata - request datacallback - code block to handle response packetpublic void send(RequestType<T> type, io.netty.buffer.ByteBuf data, Callback callback)
Send request packet to server.
type - call typedata - request datacallback - code block to handle response packetpublic void send(RequestType<T> type, java.nio.ByteBuffer data, kotlin.jvm.functions.Function1<? super ketty.common.Packet<error.NonExistentClass>,? extends java.lang.Object> callback)
Send request packet to server.
type - call typedata - request datacallback - code block to handle response packetpublic void send(RequestType<T> type, java.nio.ByteBuffer data, Callback callback)
Send request packet to server.
type - call typedata - request datacallback - code block to handle response packetpublic void send(RequestType<T> type, byte[] data, kotlin.jvm.functions.Function1<? super ketty.common.Packet<error.NonExistentClass>,? extends java.lang.Object> callback)
Send request packet to server.
type - call typedata - request datacallback - code block to handle response packetpublic void send(RequestType<T> type, byte[] data, Callback callback)
Send request packet to server.
type - call typedata - request datacallback - code block to handle response packetpublic java.util.concurrent.Future<ketty.common.Packet> send(RequestType<T> type, Body body)
Send request packet to server.
type - call typebody - request bodypublic java.util.concurrent.Future<ketty.common.Packet> send(RequestType<T> type, io.netty.buffer.ByteBuf data)
Send request packet to server.
type - call typedata - request datapublic java.util.concurrent.Future<ketty.common.Packet> send(RequestType<T> type, java.nio.ByteBuffer data)
Send request packet to server.
type - call typedata - request datapublic java.util.concurrent.Future<ketty.common.Packet> send(RequestType<T> type, byte[] data)
Send request packet to server.
type - call typedata - request datapublic Packet<NonExistentClass> sendSync(RequestType<T> type, Body body)
Send request packet to server.
type - call typebody - request bodypublic Packet<NonExistentClass> sendSync(RequestType<T> type, io.netty.buffer.ByteBuf data)
Send request packet to server.
type - call typedata - request datapublic Packet<NonExistentClass> sendSync(RequestType<T> type, java.nio.ByteBuffer data)
Send request packet to server.
type - call typedata - request datapublic Packet<NonExistentClass> sendSync(RequestType<T> type, byte[] data)
Send request packet to server.
type - call typedata - request datapublic void close()
Close IPC client and release all related resources..
public boolean isConnected()
Check connection is well.