1 23 24 package com.sun.enterprise.web.connector.grizzly.algorithms; 25 26 import com.sun.enterprise.web.connector.grizzly.Handler; 27 import com.sun.enterprise.web.connector.grizzly.handlers.NoParsingHandler; 28 import java.nio.ByteBuffer ; 29 30 31 37 public class NoParsingAlgorithm extends StreamAlgorithmBase{ 38 39 40 public NoParsingAlgorithm() { 41 handler = new NoParsingHandler(getPort()); 42 } 43 44 45 48 public boolean parse(ByteBuffer byteBuffer){ 49 curLimit = byteBuffer.limit(); 50 curPosition = byteBuffer.position(); 51 byteBuffer.flip(); 52 return true; 53 } 54 55 56 59 public Handler getHandler(){ 60 ((NoParsingHandler)handler).attachChannel(socketChannel); 61 return handler; 62 } 63 64 65 68 public void recycle(){ 69 super.recycle(); 70 71 socketChannel = null; 72 if ( handler != null){ 73 ((NoParsingHandler)handler).attachChannel(null); 74 } 75 } 76 } 77 | Popular Tags |