Package com.sun.sgs.app

Examples of com.sun.sgs.app.ClientSession.send()


        ClientSession session = getSession();

        logger.log(Level.INFO, "Message from {0}", sessionName);

        // Echo message back to sender
        session.send(message);
    }

    /**
     * {@inheritDoc}
     * <p>
 
View Full Code Here


        ClientSession session = getSession();

        if (logger.isLoggable(Level.FINE)) {
            logger.log(Level.FINE, "Message from {0}", sessionName);
        }
        session.send(message);
    }
   
    /**
     * {@inheritDoc}
     * <p>
 
View Full Code Here

        public void send(WonderlandClientID wlID, Message message) {
            // issue 963: session may be null
            ClientSession session = wlID.getSession();
            if (session != null) {
                session.send(serializeMessage(message, clientID));
            }
        }

        public void send(Set<WonderlandClientID> wlIDs, Message message)
        {
View Full Code Here

        ClientSession session = getSession();

        logger.log(Level.INFO, "Message from {0}", sessionName);

        // Echo message back to sender
        session.send(message);
    }

    /**
     * {@inheritDoc}
     * <p>
 
View Full Code Here

        ClientSession session = getSession();

        if (logger.isLoggable(Level.FINE)) {
            logger.log(Level.FINE, "Message from {0}", sessionName);
        }
        session.send(message);
    }
   
    /**
     * {@inheritDoc}
     * <p>
 
View Full Code Here

           "channel name: " + channelName +
           ", user: " + name);
    Channel channel =
        (Channel) dataManager.getBinding(channelName);
    channel.join(session);
    session.send(message.asReadOnlyBuffer());
      } else if (action.equals("leave")) {
    String channelName = buf.getString();
    System.err.println("DummyClientSessionListener: leave request, " +
           "channel name: " + channelName +
           ", user: " + name);
View Full Code Here

           "channel name: " + channelName +
           ", user: " + name);
    Channel channel =
        (Channel) dataManager.getBinding(channelName);
    channel.leave(session);
    session.send(message.asReadOnlyBuffer());
      } else {
    System.err.println("DummyClientSessionListener: UNKNOWN request, " +
           "action: " +  action +
           ", user: " + name);
      }
View Full Code Here

        }
        ClientSession session = (ClientSession)
            dataManager.getBinding(client.name);
        MessageBuffer buf = new MessageBuffer(4);
        buf.putInt(counter.getAndIncrement());
        session.send(ByteBuffer.wrap(buf.getBuffer()),
               delivery);
          }},
     
      identity);
    }
View Full Code Here

    txnScheduler.runTask(new TestAbstractKernelRunnable() {
      public void run() {
          ClientSession session = (ClientSession)
        AppContext.getDataManager().getBinding(name);
          System.err.println("Sending messages");
          session.send(buf, delivery);
      } }, taskOwner);
      }
 
      System.err.println("waiting for client to receive messages");
      client.waitForClientToReceiveExpectedMessages(numMessages);
View Full Code Here

        public void run() {
      Set<ClientSession> sessions =
          getAppListener().getSessions();
      ClientSession session = sessions.iterator().next();
      try {
          session.send(ByteBuffer.wrap(new byte[4096]));
      } catch (MessageRejectedException e) {
          fail("Should not run out of buffer space: " + e);
      }
      if (++tryCount < 100) {
          throw new MaybeRetryException("Retryable"true);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.