|
2009-01-09 1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConnectionService
The ConnectionService interface defines the ConnectionService concept. A ConnectionService is an encapsulation of a pair of streams, one input and one output. A user of a connection can open and close a connection, get each stream, and test if a stream is open. Generally, after opening a ConnectionService, and getting the streams, a ConnectionService user will read and write to the streams, closing the ConnectionService when finished.
| Field Summary | |
|---|---|
static java.lang.String |
CONNECTION_DEFAULT
Define the connection default (String) constant. |
static java.lang.String |
CONNECTION_KEY
Define the connection key (String) constant. |
static java.lang.String |
CONNECTION_TYPE
Define the connection type (String) constant. |
static java.lang.String |
DEFAULT_CONNECTION
Deprecated. #CONNECTION_DEFAULT |
static java.lang.String |
SERVICE_NAME
Define the OSGi service name. |
| Method Summary | |
|---|---|
void |
close()
Perform the close action method. |
void |
exit()
Request the connection to exit. |
void |
flush()
Flush any data to be written. |
boolean |
isOpen()
Gets the boolean open property value. |
void |
open()
Perform the open action method. |
int |
read(byte[] bytes)
Read data into the bytes specified. |
int |
read(byte[] bytes,
int offset,
int length)
Read data into the bytes specified. |
void |
setConfigurationInformation(java.util.Dictionary configurationInformation)
Sets the configuration information value. |
void |
write(byte[] bytes)
Writes the bytes from the byte array. |
void |
write(byte[] bytes,
int offset,
int count)
Writes count bytes from the byte array buffer starting at offset. |
| Field Detail |
|---|
static final java.lang.String SERVICE_NAME
static final java.lang.String CONNECTION_KEY
static final java.lang.String CONNECTION_TYPE
static final java.lang.String CONNECTION_DEFAULT
static final java.lang.String DEFAULT_CONNECTION
| Method Detail |
|---|
void close()
throws java.io.IOException
java.io.IOException - IOException.
void exit()
throws java.io.IOException
java.io.IOException - IOException.
void flush()
throws java.io.IOException
java.io.IOException - IOException.boolean isOpen()
boolean open property value. This API returns a boolean which tells whether or not the ConnectionService contains valid, open streams.
boolean) value.
void open()
throws java.io.IOException
java.io.IOException - IOException.
int read(byte[] bytes)
throws java.io.IOException
bytes - The bytes (byte[]) parameter.
java.io.IOException - IOException.read(byte[],int,int)
int read(byte[] bytes,
int offset,
int length)
throws java.io.IOException
bytes - The bytes (byte[]) parameter.offset - The offset (int) parameter.length - The length (int) parameter.
java.io.IOException - IOException.read(byte[])void setConfigurationInformation(java.util.Dictionary configurationInformation)
configurationInformation - The configuration information (Dictionary) parameter.
void write(byte[] bytes)
throws java.io.IOException
bytes from the byte array.
bytes - The bytes (byte[]) parameter.
java.io.IOException - IOException.write(byte[],int,int)
void write(byte[] bytes,
int offset,
int count)
throws java.io.IOException
count bytes from the byte array buffer starting at offset.
bytes - The bytes (byte[]) parameter.offset - The offset (int) parameter.count - The count (int) parameter.
java.io.IOException - IOException.write(byte[])
|
2009-01-09 1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||