Advertisement
heroandparol

Untitled

Nov 26th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. public abstract class Connection implements Runnable, Serializable {
  2.     private static final long serialVersionUID = 1L;
  3.     protected final Service service;
  4.     protected final Socket peer;
  5.     protected static boolean running;
  6.     protected final LinkedBlockingQueue<Event> buffer;
  7.    
  8.     public Connection(final Service service, final Socket peer) {
  9.         this.service = service;
  10.         this.peer = peer;
  11.         running = false;
  12.         this.buffer = new LinkedBlockingQueue<Event>();
  13.     }
  14.    
  15.     /**
  16.      * Sends an event.
  17.      * @param event an Event
  18.      * @throws IOException
  19.      */
  20.     public abstract void sendEvent(Event event) throws IOException;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement