CounterAsyncChannel (ActiveIO 1.0 API)
Keywords: org.activeio.filter.CounterAsyncChannel 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 CounterAsyncChannel

    java.lang.Object
      org.activeio.FilterAsynchChannel
          org.activeio.filter.CounterAsyncChannel

All Implemented Interfaces:
  AsynchChannel, AsynchChannelListener, Channel, Disposable, InputAsynchChannel, OutputChannel, Service

public final class CounterAsyncChannel
extends FilterAsynchChannel

A CounterAsyncChannel is a simple `org.activeio.AsynchChannelFilter` that counts the number bytes that been sent down and up through the channel. The `org.activeio.counter.CounterAttribueEnum.COUNTER_INBOUND_COUNT` and `org.activeio.counter.CounterAttribueEnum.COUNTER_OUTBOUND_COUNT` attributes can be used to find query the channel to get the current inbound and outbound byte counts.

Version:
  $Revision$

Field Summary
`(package private) long` | `inBoundCounter`
`(package private) long` | `outBoundCounter`

Fields inherited from class org.activeio.FilterAsynchChannel
`channelListener, next`

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

Constructor Summary
`CounterAsyncChannel(AsynchChannel next)`

Method Summary
`long` | `getInBoundCounter()`
`long` | `getOutBoundCounter()`
`void` | `onPacket(Packet packet)` A `AsynchChannel` will call this method to deliver an 'up' packet to a consumer.
`void` | `write(Packet packet)` Sends a packet down the channel towards the media.

Methods inherited from class org.activeio.FilterAsynchChannel
`dispose, flush, getAsynchChannelListener, getNext, narrow, onPacketError, setAsynchChannelListener, start, stop, toString`

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

Field Detail

### inBoundCounter

    long inBoundCounter

### outBoundCounter

    long outBoundCounter

Constructor Detail

### CounterAsyncChannel

    public CounterAsyncChannel(AsynchChannel next)

Parameters:
  `next` -

Method Detail

### onPacket

    public void onPacket(Packet packet)

  Description copied from interface: `AsynchChannelListener`
  A `AsynchChannel` will call this method to deliver an 'up' packet to a consumer.

  Specified by:
    `onPacket` in interface `AsynchChannelListener`
  Overrides:
    `onPacket` in class `FilterAsynchChannel`
  See Also:
    `org.activeio.FilterAsynchChannel#onPacket(org.activeio.channel.Packet)`

### 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 `FilterAsynchChannel`
  Throws:
    `java.io.IOException`
  See Also:
    `org.activeio.FilterAsynchChannel#write(org.activeio.channel.Packet)`

### getInBoundCounter

    public long getInBoundCounter()

### getOutBoundCounter

    public long getOutBoundCounter()

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.