|
TPTP 4.1.0 Platform Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.hyades.collection.framework.channel.DataChannelImpl
| Field Summary | |
|---|---|
protected java.io.OutputStream |
_dc_outputStream
|
protected boolean |
_isFlushing
|
protected boolean |
_isWriting
|
protected static int |
DC_TYPE_FILLABLE
|
protected static int |
DC_TYPE_FLUSHABLE
|
protected static int |
FLUSH_TYPE_ASCII_FILE
|
protected static int |
FLUSH_TYPE_BINARY_FILE
|
protected static int |
FLUSH_TYPE_OUTPUT_STREAM
|
protected static int |
FLUSH_TYPE_PIPED_OUTPUT_STREAM
|
protected static int |
FLUSH_TYPE_RAC_FILE
|
protected static int |
FLUSH_TYPE_SOCKET
|
| Constructor Summary | |
|---|---|
DataChannelImpl()
Create a DataChannel object |
|
| Method Summary | |
|---|---|
void |
connect()
Connects to the data channel. |
void |
create()
Creates the data channel. |
void |
destroy()
Destroys the data channel. |
void |
disconnect()
Disconnects from the data channel. |
java.lang.String |
getFileName()
Retrieve the name of the file name to flush to. |
int |
getFlushType()
Retrieve the type of descriptor that describes the destination of the data. |
int |
getHandle()
Retrieve the handle of the data channel buffer. |
java.net.InetAddress |
getInetAddress()
Retrieve the name of the file name to flush to. |
java.io.InputStream |
getInputStream()
Returns an input stream that can be used to read from the data channel. |
java.lang.String |
getName()
Retrieve the name of the data channel buffer |
java.io.OutputStream |
getOutputStream()
Returns an output stream that can be used to write to the data channel. |
protected java.io.InputStream |
getPInputStream()
|
int |
getPort()
Retrieve the client port to flush to. |
protected java.io.PipedOutputStream |
getPOutputStream()
|
int |
getSize()
Retrieve the size of the data channel buffer. |
protected void |
hc_destroyDCBuffer(int bufferhandle)
Native delegate of destroy() |
protected void |
hc_detachFromDCBuffer(int bufferhandle)
Native delegate of disconnect() or detach from data channel buffer |
protected int |
hc_flushASCIIDCBufferToFile(int bufferhandle,
java.lang.String filename)
Native method to start flushing an ASCII only data channel buffer to a file |
protected int |
hc_flushBinaryDCBufferToFile(int bufferhandle,
java.lang.String filename)
Native method to start flushing a Binary only data channel buffer to a file |
protected int |
hc_flushDCBufferToSocket(int bufferhandle,
byte[] inetaddess,
int port)
Native method to start flushing the data channel buffer to a socket |
protected int |
hc_flushDCBufferToStream(int bufferhandle,
java.io.OutputStream outstr)
Native method to start flushing the data channel buffer to an OutputStream - this should probably throw an IOException |
protected int |
hc_flushRACDCBufferToFile(int bufferhandle,
java.lang.String filename)
Native method to start flushing a Agent Controller data channel buffer to a file |
protected int |
hc_writeToDCBuffer(int bufferhandle,
byte[] databytes,
int numBytes)
Native method to write an array of bytes to the data channel buffer |
boolean |
isDCBufferCreated()
Returns whether or not the data channel has been created. |
boolean |
isFillable()
Tests whether the application can fill this data channel. |
boolean |
isFlushable()
Tests whether the application can flush this data channel. |
boolean |
isFlushing()
Returns whether or not the data channel is being flushed. |
void |
setFillable()
Sets this data channel as fillable. |
void |
setFlushable()
Sets this data channel as flushable. |
void |
setInputStream(java.io.InputStream instr)
Sets the input stream that acts as the input to the data channel. |
void |
setName(java.lang.String name)
Set the name of the data channel buffer |
void |
setOutputStream(java.io.OutputStream outstr)
Sets the output stream that acts as the destination for the data on the data channel. |
void |
setSize(int size)
Set the size of the data channel buffer. |
void |
startFlushingToFile(java.lang.String flushtofilename)
Start flushing the data channel to a file |
void |
startFlushingToSocket(java.net.InetAddress flushtosocketaddress,
int flushtosocketport)
Start flushing the data channel to a socket |
void |
startFlushingToStream(java.io.OutputStream outStr)
Start flushing the data channel to a stream |
void |
startFlushingToStream(java.io.PipedOutputStream outStr)
Start flushing the data channel to a piped output stream |
void |
stopFlushing()
Stop flushing the data channel |
void |
write(byte[] bytes)
Writes bytestream.length bytes from the specified byte array to this data channel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean _isFlushing
protected boolean _isWriting
protected static final int FLUSH_TYPE_PIPED_OUTPUT_STREAM
protected static final int FLUSH_TYPE_OUTPUT_STREAM
protected static final int FLUSH_TYPE_BINARY_FILE
protected static final int FLUSH_TYPE_ASCII_FILE
protected static final int FLUSH_TYPE_RAC_FILE
protected static final int FLUSH_TYPE_SOCKET
protected static int DC_TYPE_FLUSHABLE
protected static int DC_TYPE_FILLABLE
protected java.io.OutputStream _dc_outputStream
| Constructor Detail |
public DataChannelImpl()
| Method Detail |
public void create()
throws DataChannelCreationException
create in interface IDataChannelDataChannelCreationExceptionpublic void destroy()
destroy in interface IDataChannel
public void connect()
throws DataChannelConnectionException
connect in interface IDataChannelDataChannelConnectionExceptionpublic void disconnect()
disconnect in interface IDataChannel
public void write(byte[] bytes)
throws java.io.IOException,
InvalidDataChannelAccessException
bytes - byte []
java.io.IOException
InvalidDataChannelAccessException
public void setOutputStream(java.io.OutputStream outstr)
throws InvalidDataChannelAccessException,
DataChannelNotInitializedException
outstr - java.io.OutputStream
InvalidDataChannelAccessException
DataChannelNotInitializedExceptionprotected java.io.PipedOutputStream getPOutputStream()
public java.io.OutputStream getOutputStream()
throws InvalidDataChannelAccessException,
DataChannelNotInitializedException
getOutputStream in interface IDataChannelInvalidDataChannelAccessException
DataChannelNotInitializedException
public void setInputStream(java.io.InputStream instr)
throws InvalidDataChannelAccessException,
DataChannelNotInitializedException
instr - java.io.InputStream
InvalidDataChannelAccessException
DataChannelNotInitializedExceptionprotected java.io.InputStream getPInputStream()
public java.io.InputStream getInputStream()
throws InvalidDataChannelAccessException,
DataChannelNotInitializedException
getInputStream in interface IDataChannelInvalidDataChannelAccessException
DataChannelNotInitializedExceptionpublic void startFlushingToFile(java.lang.String flushtofilename)
flushtofilename - java.lang.String - the name of the file to flush the data in the channel to
public void startFlushingToSocket(java.net.InetAddress flushtosocketaddress,
int flushtosocketport)
flushtosocketaddress - java.net.InetAddress - the address of the client to flush the data in the channel toflushtosocketport - int - the port number of the client to flush the data in the channel topublic void startFlushingToStream(java.io.PipedOutputStream outStr)
outStr - java.io.PipedOutputStream - the PipedOutputStream to flush the data in the channel topublic void startFlushingToStream(java.io.OutputStream outStr)
outStr - java.io.OutputStream - the OutputStream to flush the data in the channel topublic void stopFlushing()
public void setFlushable()
throws InvalidDataChannelAccessException
setFlushable in interface IDataChannelInvalidDataChannelAccessExceptionpublic boolean isFlushable()
isFlushable in interface IDataChannel
public void setFillable()
throws InvalidDataChannelAccessException
setFillable in interface IDataChannelInvalidDataChannelAccessExceptionpublic boolean isFillable()
isFillable in interface IDataChannelprotected void hc_destroyDCBuffer(int bufferhandle)
bufferhandle - int - handle of data channel bufferprotected void hc_detachFromDCBuffer(int bufferhandle)
bufferhandle - int - handle of data channel buffer
protected int hc_flushRACDCBufferToFile(int bufferhandle,
java.lang.String filename)
bufferhandle - int - handle of data channel bufferfilename - java.lang.String - name of file to flush to
protected int hc_flushASCIIDCBufferToFile(int bufferhandle,
java.lang.String filename)
bufferhandle - int - handle of data channel bufferfilename - java.lang.String - name of file to flush to
protected int hc_flushBinaryDCBufferToFile(int bufferhandle,
java.lang.String filename)
bufferhandle - int - handle of data channel bufferfilename - java.lang.String - name of file to flush to
protected int hc_flushDCBufferToSocket(int bufferhandle,
byte[] inetaddess,
int port)
bufferhandle - int - handle of data channel bufferport - int - port to flush to
protected int hc_flushDCBufferToStream(int bufferhandle,
java.io.OutputStream outstr)
bufferhandle - int - handle of data channel bufferoutstr - java.io.OutputStream - OutputStream to flush to
protected int hc_writeToDCBuffer(int bufferhandle,
byte[] databytes,
int numBytes)
bufferhandle - int - handle of data channel bufferdatabytes - byte[] - byte array of data writenumBytes - int - number of bytes of data to write
public java.lang.String getName()
getName in interface IDataChannelpublic int getFlushType()
public int getSize()
getSize in interface IDataChannelpublic int getHandle()
public java.lang.String getFileName()
public java.net.InetAddress getInetAddress()
public int getPort()
public boolean isFlushing()
public boolean isDCBufferCreated()
public void setName(java.lang.String name)
setName in interface IDataChannelname - java.lang.Stringpublic void setSize(int size)
setSize in interface IDataChannelsize - int
|
TPTP 4.1.0 Platform Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||