com.hazelcast.core.Message.getMessageObject()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中com.hazelcast.core.Message.getMessageObject()方法的一些代码示例,展示了Message.getMessageObject()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getMessageObject()方法的具体详情如下:
包路径:com.hazelcast.core.Message
类名称:Message
方法名:getMessageObject

Message.getMessageObject介绍

[英]Returns the published message
[中]返回已发布的消息

代码示例

代码示例来源:origin: mrniko/netty-socketio

@Override
  public void onMessage(Message<T> message) {
    PubSubMessage msg = message.getMessageObject();
    if (!nodeId.equals(msg.getNodeId())) {
      listener.onMessage(message.getMessageObject());
    }
  }
});

代码示例来源:origin: rancher/cattle

@Override
  public void onMessage(Message<String> message) {
    String eventString = message.getMessageObject();
    if (eventString != null) {
      onEvent(null, eventName, eventString);
    }
  }
};

代码示例来源:origin: Atmosphere/atmosphere-extensions

@Override
  public void onMessage(Message<String> message) {
    broadcastReceivedMessage(message.getMessageObject());
  }
});

代码示例来源:origin: io.snamp/internal-services

/**
 * Gets type of this message.
 *
 * @return Type of this message.
 */
@Override
public Communicator.MessageType getType() {
  return hzMessage.getMessageObject().messageType;
}

代码示例来源:origin: hazelcast/hazelcast-code-samples

@Override
  public void run() {
    System.out.println("Received: " + m.getMessageObject());
  }
};

代码示例来源:origin: hazelcast/hazelcast-code-samples

public void onMessage(Message<Date> m) {
    System.out.println("Received: " + m.getMessageObject());
  }
}

代码示例来源:origin: hazelcast/hazelcast-code-samples

@Override
public void onMessage(Message<String> message) {
  System.out.println("Got message " + message.getMessageObject());
}

代码示例来源:origin: networknt/light

@Override
  public void onMessage(Message<Map<String, Object>> message) {
    System.out.println(message.getMessageObject().get("host"));
    System.out.println(message.getMessageObject().get("app"));
    System.out.println(message.getMessageObject().get("category"));
    System.out.println(message.getMessageObject().get("name"));
    System.out.println(message.getMessageObject().get("data"));
  }
}

代码示例来源:origin: com.hazelcast.simulator/tests-common

@Override
  public void onMessage(Message<Long> message) {
    sleepRandomNanos(random, maxProcessingDelayNanos);
    count += message.getMessageObject();
  }
}

代码示例来源:origin: com.hazelcast/hazelcast-hibernate52

@Override
  public void onMessage(final Message<Object> message) {
      maybeInvalidate(message.getMessageObject());
  }
};

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
public void onMessage(Message msg) {
  println("Topic received = " + msg.getMessageObject());
}

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
public void onMessage(Message msg) {
  println("Topic received = " + msg.getMessageObject());
}

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
  public void onMessage(final Message<Object> message) {
      maybeInvalidate(message.getMessageObject());
  }
};

代码示例来源:origin: roghughe/captaindebug

/**
 * @see com.hazelcast.core.MessageListener#onMessage(com.hazelcast.core.Message)
 */
@Override
public void onMessage(Message<StockPrice> arg0) {
  System.out.println("Received: " + arg0.getMessageObject().toString());
}

代码示例来源:origin: com.corundumstudio.socketio/netty-socketio

@Override
  public void onMessage(Message<T> message) {
    PubSubMessage msg = message.getMessageObject();
    if (!nodeId.equals(msg.getNodeId())) {
      listener.onMessage(message.getMessageObject());
    }
  }
});

代码示例来源:origin: sitewhere/sitewhere

@Override
public void onMessage(Message<DeviceLocation> message) {
  try {
  DeviceLocation location = message.getMessageObject();
  SiteWhereReceiver.this.store(location);
  LOGGER.debug("Stored a location event.");
  } catch (Exception e) {
  SiteWhereReceiver.this.reportError("Error receiving SiteWhere location.", e);
  }
}
}

代码示例来源:origin: com.sitewhere/sitewhere-spark

@Override
public void onMessage(Message<DeviceLocation> message) {
  try {
  DeviceLocation location = message.getMessageObject();
  SiteWhereReceiver.this.store(location);
  LOGGER.debug("Stored a location event.");
  } catch (Exception e) {
  SiteWhereReceiver.this.reportError("Error receiving SiteWhere location.", e);
  }
}
}

代码示例来源:origin: com.sitewhere/sitewhere-spark

@Override
public void onMessage(Message<DeviceMeasurements> message) {
  try {
  DeviceMeasurements mx = message.getMessageObject();
  SiteWhereReceiver.this.store(mx);
  LOGGER.debug("Stored a measurements event.");
  } catch (Exception e) {
  SiteWhereReceiver.this.reportError("Error receiving SiteWhere measurements.", e);
  }
}
}

代码示例来源:origin: spring-projects/spring-integration-extensions

@Override
  public void onMessage(com.hazelcast.core.Message message) {
    HazelcastIntegrationTestUser user =
        (HazelcastIntegrationTestUser) message.getMessageObject();
    verifyHazelcastIntegrationTestUser(user, index);
    index++;
  }
});

代码示例来源:origin: com.jtbdevelopment.core-games/games-hazelcast

@Override
 public void onMessage(final Message<ClusterMessage> message) {
  if (message != null && !message.getPublishingMember().localMember()) {
   ClusterMessage clusterMessage = message.getMessageObject();
   if (clusterMessage != null) {
    receiveClusterMessage(clusterMessage);
   }

  }

 }
}

相关文章