Codota Logo
BridgeEvent.setRawMessage
Code IndexAdd Codota to your IDE (free)

How to use
setRawMessage
method
in
io.vertx.ext.web.handler.sockjs.BridgeEvent

Best Java code snippets using io.vertx.ext.web.handler.sockjs.BridgeEvent.setRawMessage (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: io.vertx/vertx-rx-java

/**
 * Get the raw JSON message for the event. This will be null for SOCKET_CREATED or SOCKET_CLOSED events as there is
 * no message involved.
 * @param message the raw message
 * @return this reference, so it can be used fluently
 */
public io.vertx.rxjava.ext.web.handler.sockjs.BridgeEvent setRawMessage(JsonObject message) { 
 delegate.setRawMessage(message);
 return this;
}
origin: vert-x3/vertx-rx

/**
 * Get the raw JSON message for the event. This will be null for SOCKET_CREATED or SOCKET_CLOSED events as there is
 * no message involved.
 * @param message the raw message
 * @return this reference, so it can be used fluently
 */
public io.vertx.rxjava.ext.web.handler.sockjs.BridgeEvent setRawMessage(JsonObject message) { 
 delegate.setRawMessage(message);
 return this;
}
origin: vert-x3/vertx-web

@Test
public void testHookPublishHeaders() throws Exception {
 sockJSHandler.bridge(allAccessOptions, be -> {
  if (be.type() == BridgeEventType.PUBLISH) {
   assertNotNull(be.socket());
   JsonObject raw = be.getRawMessage();
   assertEquals(addr, raw.getString("address"));
   assertEquals("foobar", raw.getString("body"));
   raw.put("headers", new JsonObject().put("hdr1", "val1").put("hdr2", "val2"));
   be.setRawMessage(raw);
   be.complete(true);
   testComplete();
  } else {
   be.complete(true);
  }
 });
 testPublish(addr, "foobar", true);
 await();
}
origin: vert-x3/vertx-web

@Test
public void testHookSendHeaders() throws Exception {
 sockJSHandler.bridge(allAccessOptions, be -> {
  if (be.type() == BridgeEventType.SEND) {
   assertNotNull(be.socket());
   JsonObject raw = be.getRawMessage();
   assertEquals(addr, raw.getString("address"));
   assertEquals("foobar", raw.getString("body"));
   raw.put("headers", new JsonObject().put("hdr1", "val1").put("hdr2", "val2"));
   be.setRawMessage(raw);
   be.complete(true);
   testComplete();
  } else {
   be.complete(true);
  }
 });
 testSend(addr, "foobar", true);
 await();
}
origin: io.vertx/vertx-lang-groovy

 public static io.vertx.ext.web.handler.sockjs.BridgeEvent setRawMessage(io.vertx.ext.web.handler.sockjs.BridgeEvent j_receiver, java.util.Map<String, Object> message) {
  io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.setRawMessage(message != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(message) : null));
  return j_receiver;
 }
}
origin: io.vertx/vertx-web

@Test
public void testHookSendHeaders() throws Exception {
 sockJSHandler.bridge(allAccessOptions, be -> {
  if (be.type() == BridgeEventType.SEND) {
   assertNotNull(be.socket());
   JsonObject raw = be.getRawMessage();
   assertEquals(addr, raw.getString("address"));
   assertEquals("foobar", raw.getString("body"));
   raw.put("headers", new JsonObject().put("hdr1", "val1").put("hdr2", "val2"));
   be.setRawMessage(raw);
   be.complete(true);
   testComplete();
  } else {
   be.complete(true);
  }
 });
 testSend(addr, "foobar", true);
 await();
}
origin: io.vertx/vertx-web

@Test
public void testHookPublishHeaders() throws Exception {
 sockJSHandler.bridge(allAccessOptions, be -> {
  if (be.type() == BridgeEventType.PUBLISH) {
   assertNotNull(be.socket());
   JsonObject raw = be.getRawMessage();
   assertEquals(addr, raw.getString("address"));
   assertEquals("foobar", raw.getString("body"));
   raw.put("headers", new JsonObject().put("hdr1", "val1").put("hdr2", "val2"));
   be.setRawMessage(raw);
   be.complete(true);
   testComplete();
  } else {
   be.complete(true);
  }
 });
 testPublish(addr, "foobar", true);
 await();
}
io.vertx.ext.web.handler.sockjsBridgeEventsetRawMessage

Popular methods of BridgeEvent

  • complete
  • type
  • map
  • socket
    Get the SockJSSocket instance corresponding to the event
  • completer
  • compose
  • getHandler
  • getRawMessage
  • otherwise
  • otherwiseEmpty
  • recover
  • result
  • recover,
  • result,
  • setHandler,
  • tryComplete

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • findViewById (Activity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ImageIO (javax.imageio)
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now