Package edu.rit.mp

Interface ConnectListener


public interface ConnectListener
Interface ConnectListener specifies the interface for an object that is notified whenever a Channel is connected in a ChannelGroup.
Version:
20-Dec-2007
Author:
Alan Kaminsky
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    farEndConnected(ChannelGroup theChannelGroup, Channel theChannel)
    Report that a channel was connected in the given channel group, initiated by the far end.
    void
    nearEndConnected(ChannelGroup theChannelGroup, Channel theChannel)
    Report that a channel was connected in the given channel group, initiated by the near end.
  • Method Details

    • nearEndConnected

      void nearEndConnected(ChannelGroup theChannelGroup, Channel theChannel) throws IOException
      Report that a channel was connected in the given channel group, initiated by the near end. The channel group calls the nearEndConnected() method of a registered connect listener when the channel group's connect() method is called by code in the same process.
      Parameters:
      theChannelGroup - Channel group that is calling this method.
      theChannel - Newly created channel.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • farEndConnected

      void farEndConnected(ChannelGroup theChannelGroup, Channel theChannel) throws IOException
      Report that a channel was connected in the given channel group, initiated by the far end. The channel group calls the farEndConnected() method of a registered connect listener when an incoming connection request is received from another process.
      Parameters:
      theChannelGroup - Channel group that is calling this method.
      theChannel - Newly created channel.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.