| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package diy.middleware; |
| 17 | |
|
| 18 | |
import java.util.concurrent.BlockingQueue; |
| 19 | |
|
| 20 | |
public class SessionCommand { |
| 21 | |
|
| 22 | 12 | public enum Command { |
| 23 | 3 | QUEUE, CLOSE |
| 24 | |
} |
| 25 | |
|
| 26 | |
private String sessionId; |
| 27 | |
|
| 28 | |
private BlockingQueue<Frame> queue; |
| 29 | |
|
| 30 | |
private Exception exception; |
| 31 | |
|
| 32 | |
private Command command; |
| 33 | |
|
| 34 | 94 | public SessionCommand(String sessionId, Command command) { |
| 35 | 94 | this.sessionId = sessionId; |
| 36 | 94 | this.command = command; |
| 37 | 94 | } |
| 38 | |
|
| 39 | |
public Exception getException() { |
| 40 | 37 | return exception; |
| 41 | |
} |
| 42 | |
|
| 43 | |
public void setException(Exception exception) { |
| 44 | 7 | this.exception = exception; |
| 45 | 7 | } |
| 46 | |
|
| 47 | |
public BlockingQueue<Frame> getQueue() { |
| 48 | 89 | return queue; |
| 49 | |
} |
| 50 | |
|
| 51 | |
public void setQueue(BlockingQueue<Frame> queue) { |
| 52 | 75 | this.queue = queue; |
| 53 | 75 | } |
| 54 | |
|
| 55 | |
public Command getCommand() { |
| 56 | 93 | return command; |
| 57 | |
} |
| 58 | |
|
| 59 | |
public String getSessionId() { |
| 60 | 108 | return sessionId; |
| 61 | |
} |
| 62 | |
|
| 63 | |
} |