1 23 package com.sun.enterprise.web.connector.grizzly; 24 25 import java.nio.ByteBuffer ; 26 import java.nio.channels.SocketChannel ; 27 45 public interface StreamAlgorithm{ 46 47 48 52 public int contentLength(); 53 54 55 59 public int headerLength(); 60 61 62 68 public ByteBuffer allocate(boolean useDirect, boolean useView); 69 70 71 76 public ByteBuffer preParse(ByteBuffer byteBuffer); 77 78 79 85 public boolean parse(ByteBuffer byteBuffer); 86 87 88 93 public ByteBuffer postParse(ByteBuffer byteBuffer); 94 95 96 99 public void recycle(); 100 101 102 105 public Handler getHandler(); 106 107 108 111 public void setSocketChannel(SocketChannel socketChannel); 112 113 114 117 public void setPort(int port); 118 119 120 123 public int getPort(); 124 } 125 126 | Popular Tags |