|
2009-01-09 1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MultiplexConnectionService
The MultiplexConnectionService interface defines the MultiplexConnectionService concept. A MultiplexConnectionService is an encapsulation of a pair of streams, one input and one output. A user of a channel can open and close a channel, get each stream, and test if a stream is open. Generally, after opening a MultiplexConnectionService, and getting the streams, a MultiplexConnectionService user will read and write to the streams, closing the MultiplexConnectionService when finished.
| Field Summary | |
|---|---|
static java.lang.String |
SERVICE_NAME
Define the OSGi service name. |
| Fields inherited from interface org.eclipse.soda.dk.connection.service.ConnectionService |
|---|
CONNECTION_DEFAULT, CONNECTION_KEY, CONNECTION_TYPE, DEFAULT_CONNECTION |
| Method Summary | |
|---|---|
ChannelService |
getChannel(java.lang.String channelId)
Get channel with the specified id parameter and return the ChannelRef result. |
java.util.Map |
getChannels()
Gets the channels (Map) value. |
MultiplexConnectionListener |
getConnectionListener()
Gets the connection listener (MultiplexConnectionListener) value. |
ChannelService |
openChannel(java.util.Map parameters)
Open channel with the specified channel spec parameter and return the ChannelService result. |
void |
processEvents()
Process events. |
int |
read(ChannelService channel,
byte[] bytes)
Read data into the bytes specified. |
int |
read(ChannelService channel,
byte[] bytes,
int offset,
int length)
Read data into the bytes specified. |
void |
setConnectionListener(MultiplexConnectionListener connectionListener)
Sets the channel listener value. |
void |
write(ChannelService channel,
byte[] bytes)
Writes the bytes from the byte array. |
void |
write(ChannelService channel,
byte[] bytes,
int offset,
int count)
Writes count bytes from the byte array buffer starting at offset. |
| Methods inherited from interface org.eclipse.soda.dk.connection.service.ConnectionService |
|---|
close, exit, flush, isOpen, open, read, read, setConfigurationInformation, write, write |
| Field Detail |
|---|
static final java.lang.String SERVICE_NAME
| Method Detail |
|---|
ChannelService getChannel(java.lang.String channelId)
channelId - The channel ID (String) parameter.
ChannelRef) value.openChannel(Map)java.util.Map getChannels()
Map) value.MultiplexConnectionListener getConnectionListener()
MultiplexConnectionListener) value.setConnectionListener(MultiplexConnectionListener)
ChannelService openChannel(java.util.Map parameters)
throws java.io.IOException
parameters - The parameters (Map) parameter.
ChannelService) value.
java.io.IOException - IOException.getChannel(String)
void processEvents()
throws java.lang.Exception
java.lang.Exception - Exception.
int read(ChannelService channel,
byte[] bytes)
throws java.io.IOException
channel - The channel (ChannelService) parameter.bytes - The bytes (byte[]) parameter.
java.io.IOException - IOException.read(ChannelService,byte[],int,int)
int read(ChannelService channel,
byte[] bytes,
int offset,
int length)
throws java.io.IOException
channel - The channel (ChannelService) parameter.bytes - The bytes (byte[]) parameter.offset - The offset (int) parameter.length - The length (int) parameter.
java.io.IOException - IOException.read(ChannelService,byte[])void setConnectionListener(MultiplexConnectionListener connectionListener)
connectionListener - The connection listener (MultiplexConnectionListener) parameter.getConnectionListener()
void write(ChannelService channel,
byte[] bytes)
throws java.io.IOException
bytes from the byte array.
channel - The channel (ChannelService) parameter.bytes - The bytes (byte[]) parameter.
java.io.IOException - IOException.write(ChannelService,byte[],int,int)
void write(ChannelService channel,
byte[] bytes,
int offset,
int count)
throws java.io.IOException
count bytes from the byte array buffer starting at offset.
channel - The channel (ChannelService) parameter.bytes - The bytes (byte[]) parameter.offset - The offset (int) parameter.count - The count (int) parameter.
java.io.IOException - IOException.write(ChannelService,byte[])
|
2009-01-09 1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||