Documentation of 'edu.rit.mp.Channel' Java class
Channel
edu.rit.mp

Class Channel



  • public abstract class Channel
    extends java.lang.Object
    Class Channel provides a channel for sending and receiving messages in the Message Protocol (MP).

    A channel object is not constructed directly. Rather, a channel group object is used to connect a channel to another computer, accept a channel connection from another computer, or obtain a "loopback" channel within the same computer. See class ChannelGroup for further information.

    An information object may be associated with a channel. An application using MP can use the information object to hold additional data about the channel.

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      void close()
      Close this channel.
      void dump(java.io.PrintStream out, java.lang.String prefix)
      Dump the state of this channel on the given print stream.
      abstract java.net.InetSocketAddress farEndAddress()
      Obtain this channel's far end address.
      abstract int farEndChannelGroupId()
      Obtain the channel group ID of this channel's far end channel group.
      ChannelGroup getChannelGroup()
      Obtain the channel group that created this channel.
      java.lang.Object info()
      Obtain this channel's information object.
      void info(java.lang.Object theInfo)
      Set this channel's information object.
      abstract java.net.InetSocketAddress nearEndAddress()
      Obtain this channel's near end address.
      abstract int nearEndChannelGroupId()
      Obtain the channel group ID of this channel's near end channel group.
      java.lang.String toString()
      Returns a string version of this channel.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getChannelGroup

        public ChannelGroup getChannelGroup()
        Obtain the channel group that created this channel.
        Returns:
        Channel group.
      • nearEndChannelGroupId

        public abstract int nearEndChannelGroupId()
        Obtain the channel group ID of this channel's near end channel group.
        Returns:
        Near end channel group ID.
      • farEndChannelGroupId

        public abstract int farEndChannelGroupId()
        Obtain the channel group ID of this channel's far end channel group.
        Returns:
        Far end channel group ID.
      • nearEndAddress

        public abstract java.net.InetSocketAddress nearEndAddress()
        Obtain this channel's near end address. This is the host and port of the near end of this channel's connection.
        Returns:
        Near end address.
      • farEndAddress

        public abstract java.net.InetSocketAddress farEndAddress()
        Obtain this channel's far end address. This is the host and port of the far end of this channel's connection.
        Returns:
        Far end address.
      • info

        public java.lang.Object info()
        Obtain this channel's information object.
        Returns:
        Information object, or null if none.
      • info

        public void info(java.lang.Object theInfo)
        Set this channel's information object.
        Parameters:
        theInfo - Information object, or null if none.
      • close

        public void close()
        Close this channel. Any pending send requests will fail with a ChannelClosedException.
      • toString

        public java.lang.String toString()
        Returns a string version of this channel.
        Overrides:
        toString in class java.lang.Object
      • dump

        public void dump(java.io.PrintStream out,
                         java.lang.String prefix)
        Dump the state of this channel on the given print stream. For debugging.
        Parameters:
        out - Print stream.
        prefix - String to print at the beginning of each line.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.