本文整理汇总了Java中org.jboss.errai.bus.client.api.messaging.MessageCallback类的典型用法代码示例。如果您正苦于以下问题:Java MessageCallback类的具体用法?Java MessageCallback怎么用?Java MessageCallback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MessageCallback类属于org.jboss.errai.bus.client.api.messaging包,在下文中一共展示了MessageCallback类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: sendMessage
import org.jboss.errai.bus.client.api.messaging.MessageCallback; //导入依赖的package包/类
private void sendMessage() {
final String messageText = messageTextBox.getText();
if ("".equals(messageText)) {
setStatus("message is mandatory");
messageTextBox.setFocus(true);
return;
}
setStatus("sending message from Errai Bus Client ...");
MessageBuilder.createMessage()
.toSubject("HelloWorldService")
.withValue(messageText)
.done()
.repliesTo(new MessageCallback() {
public void callback(Message message) {
setStatus("Response from server: " + message.get(String.class, MessageParts.Value));
}
})
.sendNowWith(messageBus);
}
开发者ID:stbland,项目名称:test-errai4-tomcat,代码行数:21,代码来源:AppEntryPoint.java
示例2: onPostConstruct
import org.jboss.errai.bus.client.api.messaging.MessageCallback; //导入依赖的package包/类
/**
* Called when the service is constructed.
*/
@PostConstruct
private void onPostConstruct() {
bus.subscribe("NotificationService", new MessageCallback() { //$NON-NLS-1$
@Override
public void callback(Message message) {
NotificationBean notification = message.getValue(NotificationBean.class);
doNotify(notification);
}
});
}
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:14,代码来源:NotificationService.java
示例3: onPageShown
import org.jboss.errai.bus.client.api.messaging.MessageCallback; //导入依赖的package包/类
/**
* Called whenver the page is shown.
*/
@PageShown
public void onPageShown() {
GWT.log("Subscribing to SitWatch topic."); //$NON-NLS-1$
bus.subscribe("SitWatch", new MessageCallback() { //$NON-NLS-1$
@Override
public void callback(Message message) {
SituationEventBean sitEvent = message.get(SituationEventBean.class, "situation"); //$NON-NLS-1$
onNewSituation(sitEvent);
}
});
}
开发者ID:Governance,项目名称:rtgov-ui,代码行数:15,代码来源:SituationsPage.java
示例4: onPostConstruct
import org.jboss.errai.bus.client.api.messaging.MessageCallback; //导入依赖的package包/类
/**
* Called when the service is constructed.
*/
@PostConstruct
private void onPostConstruct() {
bus.subscribe("NotificationService", new MessageCallback() { //$NON-NLS-1$
@Override
public void callback(Message message) {
NotificationBean notification = message.getValue(NotificationBean.class);
doNotify(notification);
}
});
}
开发者ID:Governance,项目名称:dtgov,代码行数:14,代码来源:NotificationService.java
注:本文中的org.jboss.errai.bus.client.api.messaging.MessageCallback类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论