Package org.jcsp.net

Class Net2OneChannel

All Implemented Interfaces:
ChannelInput, Poisonable, NetChannelInput, Networked

class Net2OneChannel extends NetAltingChannelInput
A channel for network input (RX). This is a "Net2One" channel, which can only be used by one reader at a time.
  • Field Details

  • Constructor Details

  • Method Details

    • create

      static Net2OneChannel create(String label)
    • create

      static Net2OneChannel create()
    • create

      static Net2OneChannel create(ChannelDataStore buffer)
    • create

      static Net2OneChannel create(String label, ChannelDataStore buffer)
    • getChannelLocation

      public NetChannelLocation getChannelLocation()
      Returns a new NetChannelLocation object which holds the information necessary for a networked ChannelOutput to establish a connection to this channel reader.
      Returns:
      the location information for this channel reader.
    • destroyReader

      public void destroyReader()
      Destroys this end of the channel.
    • getChannel

      protected AltingChannelInput getChannel()
      This method should not be called. The implementation channel is not available to subclasses of Net2OneChannel.
      Overrides:
      getChannel in class AltingChannelInputWrapper
      Returns:
      Always null.
    • getChannelIndex

      long getChannelIndex()
    • getFactoryClass

      public Class getFactoryClass()
      Description copied from interface: NetChannelInput

      Returns a Class file of the factory used to construct the channel end.

      Returns:
      the Class of the factory class.
    • poison

      public void poison(PoisonException poison)
      Currently, network channels are unpoisonable so this method has no effect.
    • checkPoison

      public void checkPoison() throws PoisonException
      Currently, network channels are unpoisonable so this method will never throw a PoisonException
      Throws:
      PoisonException