public abstract class AbstractIpcChannel extends java.lang.Object implements IpcChannel
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
channelId |
protected ClientContext |
clientContext |
protected byte[] |
clientNonce |
protected IpcChannelListener |
ipcChannelListener |
protected long |
myCounter |
protected EphemeralKeyPair |
myKey |
protected long |
peerCounter |
protected byte[] |
serverNonce |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractIpcChannel(java.lang.String channelId,
IpcChannelListener ipcChannelListener,
EphemeralKeyPair myKey) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConnectInfoprotected byte[] serverNonce
protected byte[] clientNonce
protected final java.lang.String channelId
protected final IpcChannelListener ipcChannelListener
protected final EphemeralKeyPair myKey
protected ClientContext clientContext
protected long myCounter
protected long peerCounter
protected AbstractIpcChannel(java.lang.String channelId,
IpcChannelListener ipcChannelListener,
EphemeralKeyPair myKey)
public void attachClientContext(ClientContext clientContext)
attachClientContext in interface IpcChannelpublic IpcChannelStatus getChannelStatus()
getChannelStatus in interface IpcChannelpublic java.lang.String getChannelId()
getChannelId in interface IpcChannelpublic void sendFrame(com.google.protobuf.GeneratedMessageV3 frame)
throws java.io.IOException
sendFrame in interface IpcChanneljava.io.IOExceptionpublic void onAlertFrame(Frames.AlertFrame frame) throws java.io.IOException
onAlertFrame in interface FrameConverter.FrameHandlersjava.io.IOExceptionpublic void onServerHello(Frames.ServerHelloFrame frame) throws java.io.IOException
onServerHello in interface FrameConverter.FrameHandlersjava.io.IOExceptionpublic void onClientHello(Frames.ClientHelloFrame frame) throws java.io.IOException
onClientHello in interface FrameConverter.FrameHandlersjava.io.IOExceptionpublic void onWrappedData(Frames.EncryptedWrappedData frame) throws java.io.IOException
onWrappedData in interface FrameConverter.FrameHandlersjava.io.IOExceptionpublic void onCleanup()
onCleanup in interface FrameConverter.FrameHandlerspublic void sendWrappedData(Frames.WrappedData wrappedData) throws java.io.IOException
sendWrappedData in interface IpcChanneljava.io.IOExceptionpublic byte[] generateSecret(java.lang.String type,
long counter,
int size)
public Frames.EncryptedWrappedData wrapDataToSend(byte[] data)
public static void safeOutputStreamWrite(java.io.OutputStream outputStream,
byte[] data)
throws java.io.IOException
java.io.IOExceptionpublic Frames.WrappedData unwrapDataToRecv(Frames.EncryptedWrappedData wrappedData)
public <T extends com.google.protobuf.GeneratedMessageV3> void registerWrappedData(T messageDefaultInstance,
WrappedDataReceiver<T> receiver)
registerWrappedData in interface IpcChannelpublic void addCleanupHandler(CleanupHandler cleanupHandler)
addCleanupHandler in interface IpcChannel