Class ChannelFactory

java.lang.Object
java.lang.Thread
edu.jas.util.ChannelFactory
All Implemented Interfaces:
Runnable

public class ChannelFactory extends Thread
ChannelFactory implements a symmetric and non blocking way of setting up sockets on the client and server side. The constructor sets up a ServerSocket and accepts and stores any Socket creation requests from clients. The created Sockets can the be retrieved from the store without blocking. Refactored for java.util.concurrent.
Author:
Akitoshi Yoshida, Heinz Kredel
See Also:
  • Field Details

    • DEFAULT_PORT

      public static final int DEFAULT_PORT
      default port of socket.
      See Also:
  • Constructor Details

    • ChannelFactory

      public ChannelFactory()
      Constructs a ChannelFactory on the DEFAULT_PORT.
    • ChannelFactory

      public ChannelFactory(int p)
      Constructs a ChannelFactory.
      Parameters:
      p - port.
  • Method Details