Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class Connection implements Runnable, Serializable {
- private static final long serialVersionUID = 1L;
- protected final Service service;
- protected final Socket peer;
- protected static boolean running;
- protected final LinkedBlockingQueue<Event> buffer;
- public Connection(final Service service, final Socket peer) {
- this.service = service;
- this.peer = peer;
- running = false;
- this.buffer = new LinkedBlockingQueue<Event>();
- }
- /**
- * Sends an event.
- * @param event an Event
- * @throws IOException
- */
- public abstract void sendEvent(Event event) throws IOException;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement