Java client for using PServiceBus
Java
Switch branches/tags
Nothing to show
Permalink
Failed to load latest commit information.
Samples
src/client
.hgignore
README

README

---------------------------------------------------------------------
Sample Usage
---------------------------------------------------------------------

public class ChatTopic {
	public String UserName, Message;
	public ChatTopic(){}
	public ChatTopic(String userName, String message){
		UserName = userName;
		Message = message;
	}
}


----------------------------------------------------------------------
Console application code
----------------------------------------------------------------------
//Register
PSBClient.register(ChatTopic.class);

//Subscribe 
PSBClient.subscribe(ChatTopic.class, new Action<ChatTopic>(){
	public void execute(ChatTopic msg){
		System.out.println(String.format("%s: %s",msg.UserName, msg.Message));
	}
});

//Publish
PSBClient.publish(new ChatTopic("JavaUser", "Hello from Java"));