JNodeOS v1.2.0 API

edu.utah.janos.nodeos
Class OutChannel

java.lang.Object
  |
  +--edu.utah.janos.nodeos.pj_ProtocolLayer.PacketGenerator
        |
        +--edu.utah.janos.nodeos.pj_OutChannel
              |
              +--edu.utah.janos.nodeos.OutChannel

public final class OutChannel
extends edu.utah.janos.nodeos.pj_OutChannel

Java wrapper for a NodeOS OutChannel.

Author:
Janos Ministry of Development
See Also:
CutThroughChannel, InChannel

Method Summary
static OutChannel create(Flow flow, NetworkSpec ns, java.lang.String protocolSpec, java.lang.String addressSpec)
           
static OutChannel create(Flow flow, java.lang.String protocolSpec, java.lang.String addressSpec)
          Create a new OutChannel.
 void getStats(ChanStats cs)
           
 boolean send(BufferHandle bh)
          Send a single buffer.
 void sendAndRecycle(BufferHandle bh, InChannel dustbin)
          Send a single buffer.
 void sendAsync(BufferHandle bh, DeliverFunc callback)
           
 void sendv(BufferHandle[] bh)
          Send an array of buffer handles.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static OutChannel create(Flow flow,
                                java.lang.String protocolSpec,
                                java.lang.String addressSpec)
                         throws java.io.IOException,
                                PacketAddressFormatException,
                                ProtocolSpecFormatException
Create a new OutChannel.

create

public static OutChannel create(Flow flow,
                                NetworkSpec ns,
                                java.lang.String protocolSpec,
                                java.lang.String addressSpec)
                         throws java.io.IOException,
                                PacketAddressFormatException,
                                ProtocolSpecFormatException

send

public boolean send(BufferHandle bh)
Send a single buffer. This is a synchronous send. The buffer will be owned by the system for the duration of the send, and then ownership will be restored to the caller after the send.

sendAndRecycle

public void sendAndRecycle(BufferHandle bh,
                           InChannel dustbin)
Send a single buffer. Recycle the buffer (by making it available to the given InChannel after the send is complete. This is a synchronous send. (It should probably be async.)

sendAsync

public void sendAsync(BufferHandle bh,
                      DeliverFunc callback)

sendv

public void sendv(BufferHandle[] bh)
Send an array of buffer handles.

getStats

public void getStats(ChanStats cs)
Parameters:
cs - The object to place the channel stats in.

toString

public java.lang.String toString()
Overrides:
toString in class edu.utah.janos.nodeos.pj_OutChannel

JNodeOS v1.2.0 API

This documentation is Copyright (C) 1998-2002 The University of Utah. All Rights Reserved. See the file LICENSE for distribution terms.
Documentation, software, and mailing list archives for Janos can be found at the Janos Project web site: http://www.cs.utah.edu/flux/janos/
Generated on Mar 17, 2002