public abstract class AbstractNamedPipe
extends java.lang.Object
implements java.io.Closeable
Modifier and Type | Class and Description |
---|---|
class |
AbstractNamedPipe.NamedPipeSession |
Modifier and Type | Field and Description |
---|---|
protected int |
MAX_BUFFER_SIZE |
static java.lang.String |
NAMED_PIPE_PREFIX |
protected java.lang.String |
pipeName |
Constructor and Description |
---|
AbstractNamedPipe() |
Modifier and Type | Method and Description |
---|---|
static void |
assertCallSucceeded(java.lang.String message,
boolean result)
Checks if the API call result is
true . |
protected void |
assertEquals(java.lang.String message,
int len,
int value) |
static com.sun.jna.platform.win32.WinNT.HANDLE |
assertValidHandle(java.lang.String message,
com.sun.jna.platform.win32.WinNT.HANDLE handle)
Makes sure that the handle argument is not
null or WinBase.INVALID_HANDLE_VALUE . |
java.lang.String |
getPath() |
protected final int MAX_BUFFER_SIZE
protected java.lang.String pipeName
public static final java.lang.String NAMED_PIPE_PREFIX
public java.lang.String getPath()
public static final void assertCallSucceeded(java.lang.String message, boolean result) throws java.io.IOException
true
. If not, then calls
Kernel32.GetLastError()
and fails with the error code.
Note: if the error code is WinError.ERROR_SUCCESS
then an "unknown reason code" is reportedmessage
- Message to display if call failedresult
- The API call resultjava.io.IOException
public static final com.sun.jna.platform.win32.WinNT.HANDLE assertValidHandle(java.lang.String message, com.sun.jna.platform.win32.WinNT.HANDLE handle) throws java.io.IOException
null
or WinBase.INVALID_HANDLE_VALUE
.
If invalid handle detected, then it invokes Kernel32.GetLastError()
in order to display the error codemessage
- Message to display if bad handlehandle
- The WinNT.HANDLE
to testjava.io.IOException
protected void assertEquals(java.lang.String message, int len, int value) throws java.io.IOException
java.io.IOException
Copyright © 2022. All rights reserved.