|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoemware.core.NamedPipe
public class NamedPipe
The named pipe class. Encapsulates all reads/writes to a named pipe. The read and write records will block while executing.
| Field Summary | |
|---|---|
static int |
BIDIRECTIONAL
|
static byte |
END_TRANSMIT
|
protected java.util.concurrent.atomic.AtomicLong |
mOperationStartTime
|
static int |
READ
|
static byte |
START_TRANSMIT
|
static int |
WRITE
|
| Constructor Summary | |
|---|---|
NamedPipe(java.lang.String pPipeName)
Create a new object. |
|
NamedPipe(java.lang.String pPipeName,
boolean pRead)
Create a new object. |
|
NamedPipe(java.lang.String pPipeName,
boolean pRead,
int pMaxOperationTime)
Create a new object. |
|
NamedPipe(java.lang.String pPipeName,
int pType,
long pMaxOperationTime,
boolean pAppendInstanceId)
Create a new object. |
|
| Method Summary | |
|---|---|
java.lang.String |
getPipeName()
Returns the pipe name. |
boolean |
isRead()
Returns true if this class is set to read. |
int |
read(java.nio.ByteBuffer pBuffer)
Handle reading from the np. |
int |
readAll(java.nio.ByteBuffer pBuffer)
Fill the buffer. |
void |
shutdown()
Stop the procss. |
void |
startup()
Start the process. |
int |
write(java.nio.ByteBuffer pBuffer)
Handle writing to the np. |
int |
writeAll(java.nio.ByteBuffer pBuffer)
Write all the data to the buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.util.concurrent.atomic.AtomicLong mOperationStartTime
public static final int BIDIRECTIONAL
public static final int READ
public static final int WRITE
public static final byte START_TRANSMIT
public static final byte END_TRANSMIT
| Constructor Detail |
|---|
public NamedPipe(java.lang.String pPipeName)
throws ServiceException
ServiceException
public NamedPipe(java.lang.String pPipeName,
boolean pRead)
throws ServiceException
pRead - The read flag.
ServiceException
public NamedPipe(java.lang.String pPipeName,
boolean pRead,
int pMaxOperationTime)
throws ServiceException
pRead - The read flag.
ServiceException
public NamedPipe(java.lang.String pPipeName,
int pType,
long pMaxOperationTime,
boolean pAppendInstanceId)
throws ServiceException
pPipeName - The pipe name.pType - the named pipe type.pMaxOperationTime - The max operation time. Set to zero for
unlimited or use another constructor ;-)pAppendInstanceId - The flag to set the instance id on the name.
ServiceException| Method Detail |
|---|
public final void startup()
throws ServiceException
ServiceException
public final void shutdown()
throws ServiceException
ServiceExceptionpublic final java.lang.String getPipeName()
public final boolean isRead()
public final int write(java.nio.ByteBuffer pBuffer)
throws ServiceException
pBuffer - The buffer to write. This assumes the
params are set on the byte buffer.
ServiceExcpetion
ServiceException
public final int writeAll(java.nio.ByteBuffer pBuffer)
throws ServiceException
pBuffer - The buffer to write. This assumes the
params are set on the byte buffer.
ServiceExcpetion
ServiceException
public final int read(java.nio.ByteBuffer pBuffer)
throws ServiceException
pBuffer - User configured byte buffer.
ServiceException
public final int readAll(java.nio.ByteBuffer pBuffer)
throws ServiceException
pBuffer - The buffer to write. This assumes the
params are set on the byte buffer. The receiver needs
to check and see the number of bytes actually written.
Zero is possible if the named pipe is being restarted.
ServiceExcpetion
ServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||