コード例 #1
0
ファイル: PerMessageDeflate.java プロジェクト: sqtds/tomcat7
 @Override
 public void setNext(Transformation t) {
   if (next == null) {
     this.next = t;
   } else {
     next.setNext(t);
   }
 }
コード例 #2
0
ファイル: WsFrameBase.java プロジェクト: xiaobao2110/tomcat
 public WsFrameBase(WsSession wsSession, Transformation transformation) {
   inputBuffer = new byte[Constants.DEFAULT_BUFFER_SIZE];
   messageBufferBinary = ByteBuffer.allocate(wsSession.getMaxBinaryMessageBufferSize());
   messageBufferText = CharBuffer.allocate(wsSession.getMaxTextMessageBufferSize());
   this.wsSession = wsSession;
   Transformation finalTransformation;
   if (isMasked()) {
     finalTransformation = new UnmaskTransformation();
   } else {
     finalTransformation = new NoopTransformation();
   }
   if (transformation == null) {
     this.transformation = finalTransformation;
   } else {
     transformation.setNext(finalTransformation);
     this.transformation = transformation;
   }
 }