2008-07-29 1.1.0

org.eclipse.soda.dk.multiplex.connection
Class TraceMultiplexConnection

java.lang.Object
  extended by TraceConnection
      extended by org.eclipse.soda.dk.multiplex.connection.TraceMultiplexConnection

public class TraceMultiplexConnection
extends TraceConnection

Version:
1.1.0

Constructor Summary
TraceMultiplexConnection(ConnectionService connection)
          Constructs an instance of this class from the specified channel service parameter.
 
Method Summary
 ChannelService getChannel(java.lang.String channelId)
          Get channel with the specified channel id parameter and return the ChannelService result.
 java.util.Map getChannels()
          Gets the channels (Map) value.
 MultiplexConnectionListener getConnectionListener()
          Gets the channel listener value.
 MultiplexConnectionService getMultiplexConnectionService()
          Gets the channel service value.
 ChannelService openChannel(java.lang.String channelSpec)
          Open channel with the specified channel spec parameter and return the ChannelService result.
 void processEvents()
           
 int read(ChannelService channel, byte[] bytes)
           
 int read(ChannelService channel, byte[] bytes, int offset, int length)
           
 void setConnectionListener(MultiplexConnectionListener listener)
          Sets the channel listener value.
 void write(ChannelService channel, byte[] bytes)
           
 void write(ChannelService channel, byte[] bytes, int offset, int count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TraceMultiplexConnection

public TraceMultiplexConnection(ConnectionService connection)
Constructs an instance of this class from the specified channel service parameter. The connection service (ConnectionService) parameter.

Parameters:
connection - The channel service (MultiplexConnectionService) parameter.
Method Detail

getChannel

public ChannelService getChannel(java.lang.String channelId)
Get channel with the specified channel id parameter and return the ChannelService result.

Parameters:
channelId - The channel id (String) parameter.
Returns:
Results of the get channel (ChannelService) value.
See Also:
#getDefaultChannel(), openChannel(String)

getChannels

public java.util.Map getChannels()
Gets the channels (Map) value.

Returns:
The channels (Map) value.

getConnectionListener

public MultiplexConnectionListener getConnectionListener()
Gets the channel listener value.

Returns:
The channel listener (MultiplexConnectionListener) value.
See Also:
setConnectionListener(MultiplexConnectionListener)

getMultiplexConnectionService

public MultiplexConnectionService getMultiplexConnectionService()
Gets the channel service value.

Returns:
The channel service (MultiplexConnectionService) value.

openChannel

public ChannelService openChannel(java.lang.String channelSpec)
                           throws java.io.IOException
Open channel with the specified channel spec parameter and return the ChannelService result.

Parameters:
channelSpec - The channel spec (String) parameter.
Returns:
Results of the open channel (ChannelService) value.
Throws:
java.io.IOException - IOException.
See Also:
getChannel(String), #getDefaultChannel()

read

public int read(ChannelService channel,
                byte[] bytes)
         throws java.io.IOException
Parameters:
channel - The channel (ChannelService) parameter.
bytes - The bytes (byte[]) parameter.
Returns:
Results of the read (int) value.
Throws:
java.io.IOException - IOException.
See Also:
read(ChannelService,byte[],int,int)

read

public int read(ChannelService channel,
                byte[] bytes,
                int offset,
                int length)
         throws java.io.IOException
Parameters:
channel - The channel (ChannelService) parameter.
bytes - The bytes (byte[]) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the read (int) value.
Throws:
java.io.IOException - IOException.
See Also:
read(ChannelService,byte[])

setConnectionListener

public void setConnectionListener(MultiplexConnectionListener listener)
Sets the channel listener value.

Parameters:
listener - The listener (MultiplexConnectionListener) parameter.
See Also:
getConnectionListener()

write

public void write(ChannelService channel,
                  byte[] bytes)
           throws java.io.IOException
Parameters:
channel - The channel (ChannelService) parameter.
bytes - The bytes (byte[]) parameter.
Throws:
java.io.IOException - IOException.
See Also:
write(ChannelService,byte[],int,int)

write

public void write(ChannelService channel,
                  byte[] bytes,
                  int offset,
                  int count)
           throws java.io.IOException
Parameters:
channel - The channel (ChannelService) parameter.
bytes - The bytes (byte[]) parameter.
offset - The offset (int) parameter.
count - The count (int) parameter.
Throws:
java.io.IOException - IOException.
See Also:
write(ChannelService,byte[])

processEvents

public void processEvents()
                   throws java.lang.Exception
Throws:
java.lang.Exception

2008-07-29 1.1.0

Copyright (c) 2008 IBM. See license in Legal section.