All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.appsatori.gaelyk.console.ChannelReporter.groovy Maven / Gradle / Ivy

Go to download

Gaelyk Console Plugin adds simple console which can execute groovlet like code.

The newest version!
package eu.appsatori.gaelyk.console

import com.google.appengine.api.channel.ChannelMessage;
import com.google.appengine.api.channel.ChannelServiceFactory
import com.google.appengine.api.channel.ChannelService

class ChannelReporter {
	final ChannelService service = ChannelServiceFactory.channelService
	final String channel

	public ChannelReporter(String message) {
		this.channel = message
	}
	
	public String leftShift(Object message){
		try {
			service.sendMessage(new ChannelMessage(channel, "" + message))
		} catch(Exception e){
			// don't care, you just don't get the notification
		}
	}
	
	public String call(Object message){
		leftShift(message)
	}
	

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy