1 23 package com.sun.enterprise.server.ss.provider; 24 25 import java.nio.channels.SelectableChannel ; 26 import java.nio.channels.SelectionKey ; 27 import java.nio.channels.Selector ; 28 29 30 39 public class ASSelectionKey extends SelectionKey { 40 41 private SelectableChannel channel = null; 42 private SelectionKey key = null; 43 44 private Selector sel = null; 45 46 ASSelectionKey(SelectableChannel channel, 47 SelectionKey key, 48 Selector sel) { 49 this.channel = channel; 50 this.key = key; 51 this.sel = sel; 52 } 53 54 public SelectableChannel channel() { 55 return channel; 56 } 57 58 public Selector selector() { 59 return sel; 60 } 61 62 public boolean isValid() { 63 return key.isValid(); 64 } 65 66 public void cancel() { 67 key.cancel(); 68 } 69 70 public int interestOps() { 71 return key.interestOps(); 72 } 73 74 public SelectionKey interestOps(int i) { 75 return key.interestOps(i); 76 } 77 78 public int readyOps() { 79 return key.readyOps(); 80 } 81 82 public boolean equals(java.lang.Object obj) { 83 return key.equals(obj); 84 } 85 86 public int hashCode() { 87 return key.hashCode(); 88 } 89 } 90 | Popular Tags |