@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(Components.objectName(this)) .append(" ["); if (request().method() != null) { builder.append("method=") .append(request().method()) .append(", "); } if (request().id().isPresent()) { builder.append("id=") .append(request().id().get()); } if (channels() != null) { builder.append("channels=") .append(Channel.toString(channels())); } builder.append(']'); return builder.toString(); } }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(Components.objectName(this)) .append(" ["); if (request().method() != null) { builder.append("method=") .append(request().method()) .append(", "); } if (request().id().isPresent()) { builder.append("id=") .append(request().id().get()); } if (channels() != null) { builder.append("channels=") .append(Channel.toString(channels())); } builder.append(']'); return builder.toString(); } }
public void onJsonInput(JsonInput event, PortalSession channel) throws InterruptedException, IOException { if (!event.request().method().equals("retrievedLocalData")) { return;
public void onJsonInput(JsonInput event, PortalSession channel) throws InterruptedException, IOException { if (!event.request().method().equals("retrievedLocalData")) { return;
/** * Handle JSON input. * * @param event the event * @param channel the channel * @throws InterruptedException the interrupted exception * @throws IOException Signals that an I/O exception has occurred. */ @SuppressWarnings("PMD.DataflowAnomalyAnalysis") @Handler(channels = PortalChannel.class) public void onJsonInput(JsonInput event, PortalSession channel) throws InterruptedException, IOException { // Send events to portlets on portal's channel JsonArray params = event.request().params(); switch (event.request().method()) { // NOPMD case "setTheme": { fire(new SetTheme(params.asString(0)), channel); break; } default: // Ignore unknown break; } }
switch (event.request().method()) { case "portalReady": { fire(new PortalReady(view.renderSupport()), channel);
switch (event.request().method()) { case "portalReady": { fire(new PortalReady(view.renderSupport()), channel);