public class JWSockIPC
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
cancelIPC(java.lang.String propsprefix,
java.util.Properties launchProperties)
Cancel a previously prepared JWSockIPC
|
void |
close()
Close this JWSockIPC and the Socket underlying it
|
static JWSockIPC |
connectChild()
Called by the child process to establish a Socket back to the parent process for IPC
|
static JWSockIPC |
connectChild(java.lang.String propsprefix)
Called by the child process to establish a Socket back to the parent process for IPC
|
static JWSockIPC |
connectParent(java.util.Properties launchProperties)
Called by the parent process after launching the child process to establish the Socket for IPC
|
static JWSockIPC |
connectParent(java.lang.String propsprefix,
java.util.Properties launchProperties)
Called by the parent process after launching the child process to establish the Socket for IPC
|
static JWSockIPC |
createNewIPC(java.net.Socket sock) |
static void |
dumpIPCProperties(java.util.Properties props) |
static void |
dumpIPCProperties(java.util.Properties props,
java.lang.String propsprefix) |
java.io.InputStream |
getInChannel(short id)
Get the multiplexed InputStream with the specified ID (-32,768 to 32,767 inclusive) This is paired with the InputStream
of the same ID on the opposing Process.
|
java.io.OutputStream |
getOutChannel(short id)
Get the multiplexed OutputStream with the specified ID (-32,768 to 32,767 inclusive).
|
java.net.Socket |
getRawUnencryptedSocket()
Get the raw Socket set up by JWSockIPC between the parent and child process.
|
static void |
setupForIPC(java.util.Properties launchProperties,
boolean aesEncrypted)
Set up a child process for JWSockIPC by configuring its launch properties
|
static void |
setupForIPC(java.lang.String propsprefix,
java.util.Properties launchProperties,
boolean aesEncrypted)
Set up a child process for JWSockIPC by configuring its launch properties
|
void |
setupMultipleChannels()
Set up multiplexing on the Socket to split it into multiple (63355) in/out channels (InputStream/OutputStream pairs).
|
void |
setupPingsAndReportClosure(JWSockIPCListener listener,
short channel,
long timeoutMS)
Set up pings (keepalive) on a multiplexed channel (e.g.
|
java.lang.String |
toString() |
public static JWSockIPC createNewIPC(java.net.Socket sock)
public java.lang.String toString()
toString
in class java.lang.Object
public java.net.Socket getRawUnencryptedSocket()
public void setupMultipleChannels() throws java.io.IOException
java.io.IOException
public java.io.InputStream getInChannel(short id)
id
- public java.io.OutputStream getOutChannel(short id)
id
- public void close()
public static void setupForIPC(java.util.Properties launchProperties, boolean aesEncrypted) throws java.io.IOException
launchProperties
- java.io.IOException
public static void dumpIPCProperties(java.util.Properties props)
public static void dumpIPCProperties(java.util.Properties props, java.lang.String propsprefix)
public static void setupForIPC(java.lang.String propsprefix, java.util.Properties launchProperties, boolean aesEncrypted) throws java.io.IOException
launchProperties
- java.io.IOException
public static void cancelIPC(java.lang.String propsprefix, java.util.Properties launchProperties)
launchProperties
- public static JWSockIPC connectChild() throws java.io.IOException
java.io.IOException
public static JWSockIPC connectChild(java.lang.String propsprefix) throws java.io.IOException
java.io.IOException
public static JWSockIPC connectParent(java.util.Properties launchProperties) throws java.io.IOException
launchProperties
- java.io.IOException
public static JWSockIPC connectParent(java.lang.String propsprefix, java.util.Properties launchProperties) throws java.io.IOException
launchProperties
- java.io.IOException
public void setupPingsAndReportClosure(JWSockIPCListener listener, short channel, long timeoutMS)
listener,
- can be nullchannel
- the multiplexed channel to set up pings on.timeoutMS
-