This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package gwt.user.server; | |
| import org.jboss.errai.bus.client.api.base.MessageBuilder; | |
| import org.jboss.errai.bus.client.api.messaging.Message; | |
| import org.jboss.errai.bus.client.api.messaging.MessageCallback; | |
| import org.jboss.errai.bus.client.api.messaging.RequestDispatcher; | |
| import org.jboss.errai.bus.server.annotations.Service; | |
| import com.google.inject.Inject; | |
| @Service | |
| public class MessageController implements MessageCallback { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private RequestDispatcher dispatcher = ErraiBus.getDispatcher(); | |
| private MessageBus bus = ErraiBus.get(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MessageBuilder.createMessage() | |
| .toSubject("MessageController") | |
| .signalling() | |
| .noErrorHandling() | |
| .sendNowWith(getDispatcher()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bus.subscribe("ClientService", new MessageCallback() { | |
| public void callback(Message message) { | |
| Window.alert("ClientService message is received. " + message.get(String.class, "text")); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <inherits name='org.jboss.errai.bus.ErraiBus' /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <servlet> | |
| <servlet-name>ErraiServlet</servlet-name> | |
| <servlet-class>org.jboss.errai.bus.server.servlet.DefaultBlockingServlet</servlet-class> | |
| <init-param> | |
| <param-name>auto-discover-services</param-name> | |
| <param-value>true</param-value> | |
| </init-param> | |
| <load-on-startup>1</load-on-startup> | |
| </servlet> | |
| <servlet-mapping> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Request dispatcher implementation (default is SimpleDispatcher) | |
| # | |
| errai.dispatcher_implementation=org.jboss.errai.bus.server.SimpleDispatcher |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <context-param> | |
| <param-name>ErraiApp.properties</param-name> | |
| <param-value>WEB_INF/ErraiApp.properties</param-value> | |
| </context-param> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ErraiService<?> service = ErraiServiceSingleton.getService(); | |
| this.bus = service.getBus(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package gwt.user.server; | |
| import org.jboss.errai.bus.client.api.base.MessageBuilder; | |
| import org.jboss.errai.bus.client.api.messaging.Message; | |
| import org.jboss.errai.bus.client.api.messaging.MessageBus; | |
| import org.jboss.errai.bus.client.api.messaging.MessageCallback; | |
| import org.jboss.errai.bus.server.annotations.Service; | |
| import org.jboss.errai.bus.server.service.ErraiService; | |
| import org.jboss.errai.bus.server.service.ErraiServiceSingleton; | |
| @Service |
OlderNewer