No description, website, or topics provided.
Java
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings
Documentation
src/com/kissaki
test-classes/com/kissaki/client
test/com/kissaki/client
war
www-test
.classpath
.gitignore
.project
README

README

This is library for messaging in GWT that using HTML5-message.
Connect local No-relational-objects asynchronously.
Without special setting.


SAMPLE CODE:
//////////////////////////////////////////////////////////////////////////
public class Foo implements MessengerGWTInterface {

	MessengerGWTImplement messenger;//instance for messaging.
	
	
	public Foo (String name) {
		
		//initialize messenger-instance with messenger's-name. 
		messenger = new MessengerGWTImplement("fooName", this);
		
		
		//prepare JSONObject that will be sent. For demo.
		JSONObject fooObject = new JSONObject();
		fooObject.put("childKey", new JSONString("childValue"));
		

		//"call" method,
		messenger.call(
				messenger.getName(), 				//will call another messenger who named 1st parameter.
				"fooCommand", 					//with some String for express the purpose of this message.
				messenger.tagValue("fooString", "fooValue"),	//after 3rd parameter, a Tag-Valued JSONObject parameters can be add.  
				messenger.tagValue("fooNumber", 100.0),		//The method "tagValue(String key, Something value)" prepared.
				messenger.tagValue("fooObject", fooObject)	//int, double, Sring, JSONObject & JSONArray can be use as value-parameter.
				);
	}
	
	
	@Override
	public void receiveCenter(String message) {
			
		String command = messenger.getCommand(message);//command(useful for identify some messages)
		
		String fooString = messenger.getValueForTag("fooString", message).isString().stringValue();
		Window.alert("command_" + command + "	fooString_"+fooString);
		
		double fooDouble = messenger.getValueForTag("fooNumber", message).isNumber().doubleValue();
		Window.alert("command_" + command + "	fooDouble_"+fooDouble);
		
		JSONObject fooObject = messenger.getValueForTag("fooObject", message).isObject();
		Window.alert("command_" + command + "	fooObject_"+fooObject);
				
	}
}
//////////////////////////////////////////////////////////////////////////


VERSION:0.7.0 (beta release)


GOALS:
	Delay-messaging
	Connect each client without GWT-RPC.


HOT TO USE:
	0.Download project.

	1.Copy 3 package to your source folder in your GWT-project.
	"com.kissaki.client.MessengerGWTCore"
		- Core module.

	"com.kissaki.client.subFrame.debug"
		- for System.out.println (& remote debugging)

	"com.kissaki.client.uuidGenerator
		- for Create uuid in each messenger-instance. 
		

	2.In your class, add implement interface "MessengerGWTInterface".

	3.Implement "public void receiveCenter(String message)" method at same class.

	4.Set "MessengerGWTImplement" instance in same class.
	e. g. 
		private MessengerGWTImplement messenger;

	5.Initialize "messenger"
	e. g.
		messenger = new MessengerGWTImplement("myName", this);

	6.Make call
	e. g.
		messenger.call("myName", "Something happening");

	7.The message will appear into the method "receiveCenter".
	


	If there are meny class that has self-messenger, they can contact each other.
		When you call "yourName" and then there is some messenger named "yourName",
		The message will appear in the "receiveCenter" method of"yourName".



MECHANIZM IN DETAIL:
now on writing.


LICENCE:GNU GPL