Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

Jabber Methods

Jabber methods are one-liners for sending / receiving messages on a Jabber endpoint. To view the javadocs go here

These are the different ways of using the jabber methods:

Using Gloovy Step jabber method gloovy step Using Invoke Code Step jabber method invoke step

Using Gloovy Step coder jabber method gloovy step Using Invoke Code Step coder jabber method invoke step

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
// If you already set up a jabber endpoint just use it like so:
// This sends an IM to the a jabber user
"nameOfJabberEnpoint".sendMessage("jabber.user.id@jabberserver.com", "your message here!" );

// Or you can create a jabber connection from scratch using JabberMethods.
def jabberConnectionObj = "NameOfConnectionToBeCreated".createJabberConnection ( 
    [ "host":"jabber.host.name", 
      "serviceName":"name.jabber.of.service" ]
 )

// Esablishes a Connection to the jabber server
jabberConnectionObj.connect()

// Login a certain jabber user
jabberConnectionObj.login( "jabber.user.name", "jabber.password" )

// Sends a jabber message to another jabber user
jabberConnectionObj.sendMessage("jabber.user.id@jabberserver.com", "your message here!" );

// Disconnect to the jabber server
jabberConnectionObj.disconnect()