Documentation of 'edu.jas.util.ExecutableChannels' Java class
ExecutableChannels
edu.jas.util

Class ExecutableChannels



  • public class ExecutableChannels
    extends java.lang.Object
    ExecutableChannels used to receive and execute classes.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ExecutableChannels(java.lang.String mfile)
      Constructor from machine file.
      ExecutableChannels(java.lang.String[] srvs)
      Constructor from array of server:port strings.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void close()
      close all channels and ChannelFactory.
      SocketChannel getChannel(int i)
      getChannel.
      java.lang.String getMasterHost()
      get master host.
      int getMasterPort()
      get master port.
      int numChannels()
      number of channels.
      int numServers()
      number of servers.
      void open()
      open, setup of SocketChannels.
      void open(int nc)
      open, setup of SocketChannels.
      java.lang.Object receive(int i)
      recieve on channel i.
      void send(int i, java.lang.Object o)
      send on channel i.
      java.lang.String toString()
      String representation.
      • Methods inherited from class java.lang.Object

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

      • ExecutableChannels

        public ExecutableChannels(java.lang.String[] srvs)
        Constructor from array of server:port strings.
        Parameters:
        srvs - A String array.
      • ExecutableChannels

        public ExecutableChannels(java.lang.String mfile)
                           throws java.io.FileNotFoundException
        Constructor from machine file.
        Parameters:
        mfile -
        Throws:
        FileNotFoundException.
        java.io.FileNotFoundException
    • Method Detail

      • toString

        public java.lang.String toString()
        String representation.
        Overrides:
        toString in class java.lang.Object
      • numServers

        public int numServers()
        number of servers.
      • getMasterHost

        public java.lang.String getMasterHost()
        get master host.
      • getMasterPort

        public int getMasterPort()
        get master port.
      • numChannels

        public int numChannels()
        number of channels.
      • open

        public void open()
                  throws java.io.IOException
        open, setup of SocketChannels.
        Throws:
        IOException.
        java.io.IOException
      • open

        public void open(int nc)
                  throws java.io.IOException
        open, setup of SocketChannels. If nc > servers.length open in round robin fashion.
        Parameters:
        nc - number of channels to open.
        Throws:
        IOException.
        java.io.IOException
      • close

        public void close()
        close all channels and ChannelFactory.
      • getChannel

        public SocketChannel getChannel(int i)
        getChannel.
        Parameters:
        i - channel number.
      • send

        public void send(int i,
                         java.lang.Object o)
                  throws java.io.IOException
        send on channel i.
        Parameters:
        i - channel number.
        o - object to send.
        Throws:
        java.io.IOException
      • receive

        public java.lang.Object receive(int i)
                                 throws java.io.IOException,
                                        java.lang.ClassNotFoundException
        recieve on channel i.
        Parameters:
        i - channel number.
        Returns:
        object recieved.
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.