PacketAggregatingSynchChannel (ActiveIO 1.0 API)
Keywords: org.activeio.filter.PacketAggregatingSynchChannel class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.activeio.filter
Class PacketAggregatingSynchChannel

    java.lang.Object
      org.activeio.FilterSynchChannel
          org.activeio.filter.PacketAggregatingSynchChannel

All Implemented Interfaces:
  Channel, Disposable, InputSynchChannel, OutputChannel, Service, SynchChannel

public final class PacketAggregatingSynchChannel
extends FilterSynchChannel

This PacketAggregatingSynchChannel can be used when the client is sending a 'record' style packet down the channel stack and needs receiving end to receive the same 'record' packets. This is very usefull since in general, a channel does not garantee that a Packet that is sent down will not be fragmented or combined with other Packet objects. This `SynchChannel` adds a 4 byte header to each packet that is sent down.

Version:
  $Revision$

Field Summary

Fields inherited from interface org.activeio.Service
`NO_WAIT_TIMEOUT, WAIT_FOREVER_TIMEOUT`

Constructor Summary
`PacketAggregatingSynchChannel(SynchChannel next)`

Method Summary
`Packet` | `read(long timeout)` Used to synchonously receive a packet of information going 'up' the channel.
`void` | `write(Packet packet)` Sends a packet down the channel towards the media.

Methods inherited from class org.activeio.FilterSynchChannel
`dispose, flush, getNext, narrow, start, stop, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PacketAggregatingSynchChannel

    public PacketAggregatingSynchChannel(SynchChannel next)

Parameters:
  `next` -

Method Detail

### read

    public Packet read(long timeout)
                throws java.io.IOException

  Description copied from interface: `InputSynchChannel`
  Used to synchonously receive a packet of information going 'up' the channel. This method blocks until a packet is received or the operation experiences timeout.

  Specified by:
    `read` in interface `InputSynchChannel`
  Overrides:
    `read` in class `FilterSynchChannel`
  Throws:
    `java.io.IOException`
  See Also:
    `InputSynchChannel.read(long)`

### write

    public void write(Packet packet)
               throws java.io.IOException

  Description copied from interface: `OutputChannel`
  Sends a packet down the channel towards the media.

  Specified by:
    `write` in interface `OutputChannel`
  Overrides:
    `write` in class `FilterSynchChannel`
  Throws:
    `java.io.IOException`
  See Also:
    `org.activeio.Channel#write(org.activeio.channel.Packet)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © -2005 The ActiveIO Project. All Rights Reserved.