Examples of sendMessage()


Examples of com.sk89q.craftbook.access.PlayerInterface.sendMessage()

            if (thePlayer == null) {
                chip.getOut(1).set(false);
                return;
            }
            chip.getOut(1).set(true);
            thePlayer.sendMessage(theMessage);
        }
    }
}
View Full Code Here

Examples of com.starlight.intrepid.spi.IntrepidSPI.sendMessage()

    IMessage message;
    if ( renew ) message = new LeaseIMessage( object_id );
    else message = new LeaseReleaseIMessage( object_id );

    spi.sendMessage( vmid, message, null );
  }


  private static class ManagerThread extends Thread {
    private volatile boolean keep_going = true;
View Full Code Here

Examples of com.sun.sgs.impl.client.comm.ClientConnection.sendMessage()

     * @throws IOException if an IO problem occurs
     */
    private void sendRaw(ByteBuffer buf) throws IOException {
  ClientConnection conn = clientConnection;
  if (conn != null) {
      conn.sendMessage(buf);
  } else {
      throw new IOException("client disconnected or reconnecting");
  }
    }

View Full Code Here

Examples of com.sun.sgs.test.impl.service.session.TestClientSessionServiceImplv4.DummyClient.sendMessage()

  try {
      client.waitForSuspendMessages();
      for (int i = 0; i < numMessages; i++) {
    MessageBuffer buf = new MessageBuffer(4);
    buf.putInt(i);
    client.sendMessage(buf.getBuffer(), false);
      }
      Thread.sleep(1000);
      client.sendSuspendMessagesComplete();
      SgsTestNode newNode = additionalNodes.get(newNodeHost);
      client.waitForRelocationNotification(newNode.getAppPort());
View Full Code Here

Examples of com.svanloon.game.wizard.network.MessageReceiver.sendMessage()

    try {
      mr2 = new MessageReceiver(ip, initialConnectionPort);
      message = mr2.receive();
      Message response = new Message(MessageType.GET_NAME);
      response.addMsgParam(new MessageParam(MessageParamConstants.PLAYER_NAME, name));
      mr2.sendMessage(response);
      mr2.close();
    } catch (UnknownHostException e2) {
      e2.printStackTrace();
      return;
    } catch (IOException e2) {
View Full Code Here

Examples of com.taobao.metamorphosis.client.producer.MessageProducer.sendMessage()

        final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String line = null;
        while ((line = readLine(reader)) != null) {
            // send message
            try {
                producer.sendMessage(new Message(topic, line.getBytes()), new SendMessageCallback() {

                    @Override
                    public void onMessageSent(final SendResult result) {
                        if (result.isSuccess()) {
                            System.out.println("Send message successfully,sent to " + result.getPartition());
View Full Code Here

Examples of com.taobao.metamorphosis.client.producer.XAMessageProducer.sendMessage()

                final Message msg = new Message(topic, data);
                final XAResource xares = messageProducer.getXAResource();
                final Xid xid =
                        XIDGenerator.createXID(this.formatIdIdGenerator.incrementAndGet(), this.UNIQUE_QUALIFIER);
                xares.start(xid, XAResource.TMNOFLAGS);
                final SendResult result = messageProducer.sendMessage(msg);
                if (!result.isSuccess() || i % 2 == 0) {
                    xares.end(xid, XAResource.TMFAIL);
                    xares.rollback(xid);
                }
                else {
View Full Code Here

Examples of com.trendmicro.mist.util.OpenMQTestBroker.sendMessage()

        BufferedOutputStream socketOutput = new BufferedOutputStream(socket.getOutputStream());

        /**
         * Send and receive a message from foo.in
         */
        brk.sendMessage(true, "foo.in", "foo".getBytes());
        packet.read(socketInput);
        MistMessage.MessageBlock mBlock = MistMessage.MessageBlock.newBuilder().mergeFrom(packet.getPayload()).build();
        assertEquals("queue:foo.in", mBlock.getId());
        assertEquals("foo", new String(mBlock.getMessage().toByteArray()));

View Full Code Here

Examples of com.trendrr.strest.server.connections.StrestConnectionChannel.sendMessage()

        // Write the response.
//    System.out.println(response.getResponse());
//    System.out.println("*****");
//    System.out.println(response.getResponse().getContent().toString());
   
        ChannelFuture future = con.sendMessage(response);

        // Close the non-keep-alive connection after the write operation is done.
        if (!isStrest) {
//          log.info("CLOSING NON STREST CONNECTION");
            future.addListener(ChannelFutureListener.CLOSE);
View Full Code Here

Examples of com.trendrr.strest.server.connections.StrestConnectionTxn.sendMessage()

    }
    DynMap mp = new DynMap();
    mp.put("to", to);
    mp.put("from", from);
    mp.put("message", message);
    con.sendMessage(new ResponseBuilder().txnStatusContinue().contentJSON(mp));
  }
 
  /**
   * notifies when a user disconnects
   * @param con
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.