Last active
August 29, 2015 14:01
-
-
Save mbarkley/7ec2f86833dff6873449 to your computer and use it in GitHub Desktop.
An example of securing an Errai Messaging @service with Errai Security
This file contains 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
@Service | |
@RestrictedAccess | |
public class SecureService implements MessageCallback { | |
public void calback(Message message) { | |
// ... | |
} | |
} |
This file contains 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
public class Sender { | |
@Inject | |
MessageBus bus; | |
public void sendMessage() { | |
MessageBuilder | |
.createMessage("SecureService") | |
.defaultErrorHandling() | |
.sendNowWith(bus); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment