Package com.firefly.net.support.wrap.client

Examples of com.firefly.net.support.wrap.client.SessionAttachment


public class StringLineDecoder implements Decoder {
  private static final byte LINE_LIMITOR = '\n';

  @Override
  public void decode(ByteBuffer buffer, Session session) throws Throwable {
    SessionAttachment sessionInfo = (SessionAttachment)session.getAttachment();
    ByteBuffer now = buffer;
    ByteBuffer prev = sessionInfo.byteBuffer;

    if (prev != null) {
      sessionInfo.byteBuffer = null;
View Full Code Here


  @Override
  public void sessionOpened(Session session) throws Throwable {
    log.info("session open |" + session.getSessionId());
    log.info("local: " + session.getLocalAddress());
    log.info("remote: " + session.getRemoteAddress());
    session.attachObject(new SessionAttachment());
  }
View Full Code Here

  @Override
  public void sessionOpened(Session session) throws Throwable {
    log.debug("session open |" + session.getSessionId());
    log.debug("local: " + session.getLocalAddress());
    log.debug("remote: " + session.getRemoteAddress());
    session.attachObject(new SessionAttachment());
  }
View Full Code Here

TOP

Related Classes of com.firefly.net.support.wrap.client.SessionAttachment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.