Work on #74, removed author name from all classes. [ci skip]. Author names were added due to default eclipse configuration.
This commit is contained in:
		@@ -61,8 +61,6 @@ import com.iluwatar.reactor.framework.ThreadPoolDispatcher;
 | 
			
		||||
 * <p>
 | 
			
		||||
 * The example uses Java NIO framework to implement the Reactor.
 | 
			
		||||
 * 
 | 
			
		||||
 * @author npathai
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public class App {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,8 +17,6 @@ import java.util.concurrent.TimeUnit;
 | 
			
		||||
/**
 | 
			
		||||
 * Represents the clients of Reactor pattern. Multiple clients are run concurrently and send logging
 | 
			
		||||
 * requests to Reactor.
 | 
			
		||||
 * 
 | 
			
		||||
 * @author npathai
 | 
			
		||||
 */
 | 
			
		||||
public class AppClient {
 | 
			
		||||
  private final ExecutorService service = Executors.newFixedThreadPool(4);
 | 
			
		||||
 
 | 
			
		||||
@@ -10,8 +10,6 @@ import com.iluwatar.reactor.framework.NioDatagramChannel.DatagramPacket;
 | 
			
		||||
/**
 | 
			
		||||
 * Logging server application logic. It logs the incoming requests on standard console and returns a
 | 
			
		||||
 * canned acknowledgement back to the remote peer.
 | 
			
		||||
 * 
 | 
			
		||||
 * @author npathai
 | 
			
		||||
 */
 | 
			
		||||
public class LoggingHandler implements ChannelHandler {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -19,9 +19,6 @@ import java.util.concurrent.ConcurrentLinkedQueue;
 | 
			
		||||
 * concrete implementation. It provides a block writing mechanism wherein when any
 | 
			
		||||
 * {@link ChannelHandler} wants to write data back, it queues the data in pending write queue and
 | 
			
		||||
 * clears it in block manner. This provides better throughput.
 | 
			
		||||
 * 
 | 
			
		||||
 * @author npathai
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public abstract class AbstractNioChannel {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -9,8 +9,6 @@ import java.nio.channels.SelectionKey;
 | 
			
		||||
 * <p>
 | 
			
		||||
 * A {@link ChannelHandler} can be associated with one or many {@link AbstractNioChannel}s, and
 | 
			
		||||
 * whenever an event occurs on any of the associated channels, the handler is notified of the event.
 | 
			
		||||
 * 
 | 
			
		||||
 * @author npathai
 | 
			
		||||
 */
 | 
			
		||||
public interface ChannelHandler {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,8 +16,6 @@ import java.nio.channels.SelectionKey;
 | 
			
		||||
 * 
 | 
			
		||||
 * @see SameThreadDispatcher
 | 
			
		||||
 * @see ThreadPoolDispatcher
 | 
			
		||||
 * 
 | 
			
		||||
 * @author npathai
 | 
			
		||||
 */
 | 
			
		||||
public interface Dispatcher {
 | 
			
		||||
  /**
 | 
			
		||||
 
 | 
			
		||||
@@ -10,8 +10,6 @@ import java.nio.channels.SelectionKey;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A wrapper over {@link DatagramChannel} which can read and write data on a DatagramChannel.
 | 
			
		||||
 * 
 | 
			
		||||
 * @author npathai
 | 
			
		||||
 */
 | 
			
		||||
public class NioDatagramChannel extends AbstractNioChannel {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -28,9 +28,6 @@ import java.util.concurrent.TimeUnit;
 | 
			
		||||
 * NOTE: This is one of the ways to implement NIO reactor and it does not take care of all possible
 | 
			
		||||
 * edge cases which are required in a real application. This implementation is meant to demonstrate
 | 
			
		||||
 * the fundamental concepts that lie behind Reactor pattern.
 | 
			
		||||
 * 
 | 
			
		||||
 * @author npathai
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public class NioReactor {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -11,8 +11,6 @@ import java.nio.channels.SocketChannel;
 | 
			
		||||
/**
 | 
			
		||||
 * A wrapper over {@link NioServerSocketChannel} which can read and write data on a
 | 
			
		||||
 * {@link SocketChannel}.
 | 
			
		||||
 * 
 | 
			
		||||
 * @author npathai
 | 
			
		||||
 */
 | 
			
		||||
public class NioServerSocketChannel extends AbstractNioChannel {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -11,8 +11,6 @@ import java.nio.channels.SelectionKey;
 | 
			
		||||
 * For better performance use {@link ThreadPoolDispatcher}.
 | 
			
		||||
 * 
 | 
			
		||||
 * @see ThreadPoolDispatcher
 | 
			
		||||
 * 
 | 
			
		||||
 * @author npathai
 | 
			
		||||
 */
 | 
			
		||||
public class SameThreadDispatcher implements Dispatcher {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -9,9 +9,6 @@ import java.util.concurrent.TimeUnit;
 | 
			
		||||
 * An implementation that uses a pool of worker threads to dispatch the events. This provides better
 | 
			
		||||
 * scalability as the application specific processing is not performed in the context of I/O
 | 
			
		||||
 * (reactor) thread.
 | 
			
		||||
 * 
 | 
			
		||||
 * @author npathai
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public class ThreadPoolDispatcher implements Dispatcher {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -11,8 +11,6 @@ import com.iluwatar.reactor.framework.ThreadPoolDispatcher;
 | 
			
		||||
 * 
 | 
			
		||||
 * This class tests the Distributed Logging service by starting a Reactor and then sending it
 | 
			
		||||
 * concurrent logging requests using multiple clients.
 | 
			
		||||
 * 
 | 
			
		||||
 * @author npathai
 | 
			
		||||
 */
 | 
			
		||||
public class AppTest {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user