Coverage Report - diy.middleware.SessionCommand
 
Classes in this File Line Coverage Branch Coverage Complexity
SessionCommand
100%
12/12
N/A
0
SessionCommand$Command
100%
2/2
N/A
0
 
 1  
 /*
 2  
         Copyright 2007 Alexey Akhunov
 3  
 
 4  
    Licensed under the Apache License, Version 2.0 (the "License");
 5  
    you may not use this file except in compliance with the License.
 6  
    You may obtain a copy of the License at
 7  
 
 8  
        http://www.apache.org/licenses/LICENSE-2.0
 9  
 
 10  
    Unless required by applicable law or agreed to in writing, software
 11  
    distributed under the License is distributed on an "AS IS" BASIS,
 12  
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
    See the License for the specific language governing permissions and
 14  
    limitations under the License.
 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  
 }