Package ch.softappeal.yass.core.remote.session

Examples of ch.softappeal.yass.core.remote.session.SessionClient


  SocketConnection(
    final TransportSetup setup, final Socket socket, final Reader reader, final OutputStream outputStream, final Executor writerExecutor
  ) throws Exception {
    packetSerializer = setup.packetSerializer;
    this.socket = socket;
    final SessionClient sessionClient = new SessionClient(setup, this);
    try {
      writerExecutor.execute(new Runnable() {
        @Override public void run() {
          try {
            write(outputStream);
          } catch (final Exception e) {
            sessionClient.close(e);
          }
        }
      });
    } catch (final Exception e) {
      sessionClient.close(e);
      return;
    }
    read(sessionClient, reader);
  }
View Full Code Here


  public WsConnection(final TransportSetup setup, final Session session) throws Exception {
    packetSerializer = setup.packetSerializer;
    this.session = Check.notNull(session);
    try {
      remoteEndpoint = session.getAsyncRemote();
      sessionClient = new SessionClient(setup, this);
    } catch (final Exception e) {
      try {
        session.close();
      } catch (final Exception e2) {
        e.addSuppressed(e2);
View Full Code Here

  SocketConnection(
    final TransportSetup setup, final Socket socket, final Reader reader, final OutputStream outputStream, final Executor writerExecutor
  ) throws Exception {
    packetSerializer = setup.packetSerializer;
    this.socket = socket;
    final SessionClient sessionClient = new SessionClient(setup, this);
    try {
      writerExecutor.execute(new Runnable() {
        @Override public void run() {
          try {
            write(outputStream);
View Full Code Here

  public WsConnection(final TransportSetup setup, final Session session) throws Exception {
    packetSerializer = setup.packetSerializer;
    this.session = Check.notNull(session);
    try {
      remoteEndpoint = session.getAsyncRemote(); // $todo: implement batching ? setting send timeout ?
      sessionClient = new SessionClient(setup, this);
    } catch (final Exception e) {
      try {
        session.close();
      } catch (final Exception e2) {
        e.addSuppressed(e2);
View Full Code Here

  SocketConnection(
    final TransportSetup setup, final Socket socket, final Reader reader, final OutputStream outputStream, final Executor writerExecutor
  ) throws Exception {
    packetSerializer = setup.packetSerializer;
    this.socket = socket;
    final SessionClient sessionClient = new SessionClient(setup, this);
    try {
      writerExecutor.execute(new Runnable() {
        @Override public void run() {
          try {
            write(outputStream);
View Full Code Here

  SocketConnection(
    final TransportSetup setup, final Socket socket, final Reader reader, final OutputStream outputStream, final Executor writerExecutor
  ) throws Exception {
    packetSerializer = setup.packetSerializer;
    this.socket = socket;
    final SessionClient sessionClient = new SessionClient(setup, this);
    try {
      writerExecutor.execute(new Runnable() {
        @Override public void run() {
          try {
            write(outputStream);
          } catch (final Exception e) {
            sessionClient.close(e);
          }
        }
      });
    } catch (final Exception e) {
      sessionClient.close(e);
      return;
    }
    read(sessionClient, reader);
  }
View Full Code Here

  public WsConnection(final TransportSetup setup, final Session session) throws Exception {
    packetSerializer = setup.packetSerializer;
    this.session = Check.notNull(session);
    try {
      remoteEndpoint = session.getAsyncRemote();
      sessionClient = new SessionClient(setup, this);
    } catch (final Exception e) {
      try {
        session.close();
      } catch (final Exception e2) {
        e.addSuppressed(e2);
View Full Code Here

  SocketConnection(
    final TransportSetup setup, final Socket socket, final Reader reader, final OutputStream outputStream, final Executor writerExecutor
  ) throws Exception {
    packetSerializer = setup.packetSerializer;
    this.socket = socket;
    final SessionClient sessionClient = new SessionClient(setup, this);
    try {
      writerExecutor.execute(() -> {
        try {
          write(outputStream);
        } catch (final Exception e) {
          sessionClient.close(e);
        }
      });
    } catch (final Exception e) {
      sessionClient.close(e);
      return;
    }
    read(sessionClient, reader);
  }
View Full Code Here

  public WsConnection(final TransportSetup setup, final Session session) throws Exception {
    packetSerializer = setup.packetSerializer;
    this.session = Check.notNull(session);
    try {
      remoteEndpoint = session.getAsyncRemote(); // $todo: implement batching ? setting send timeout ?
      sessionClient = new SessionClient(setup, this);
    } catch (final Exception e) {
      try {
        session.close();
      } catch (final Exception e2) {
        e.addSuppressed(e2);
View Full Code Here

  public WsConnection(final TransportSetup setup, final Session session) throws Exception {
    packetSerializer = setup.packetSerializer;
    this.session = Check.notNull(session);
    try {
      remoteEndpoint = session.getAsyncRemote(); // $todo: implement batching ? setting send timeout ?
      sessionClient = new SessionClient(setup, this);
    } catch (final Exception e) {
      try {
        session.close();
      } catch (final Exception e2) {
        e.addSuppressed(e2);
View Full Code Here

TOP

Related Classes of ch.softappeal.yass.core.remote.session.SessionClient

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.