
eu.appsatori.gaelyk.console.ChannelReporter.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gaelyk-console Show documentation
Show all versions of gaelyk-console Show documentation
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