test/net/java/sip/communicator/slick/protocol/jabber/TestOperationSetBasicInstantMessaging.java
/**
     * A method that would simply send messages to a group of people so that
     * they would get notified that tests are being run.
     */
A method that would simply send messages to a group of people so that
they would get notified that tests are being run.
A method that would simply send messages to a group of people so that they would get notified that tests are being run .
public void reportingSendFunMessages()
        throws OperationFailedException
    {
        String hostname = "";
        try{
            hostname = java.net.InetAddress.getLocalHost().getHostName() + ": ";
        }catch (UnknownHostException ex){}
        String message = hostname
                         + "Hello this is the SIP Communicator (version "
                         + System.getProperty("sip-communicator.version")
                         + ") build on: "
                         + new Date().toString()
                         + ". Have a very nice day!";
        String list = System.getProperty("accounts.reporting.JABBER_REPORT_LIST");
        logger.debug("Will send message " + message + " to: " + list);
        if(list == null || list.trim().length() == 0)
            return;
        StringTokenizer tokenizer = new StringTokenizer(list, " ");
        while(tokenizer.hasMoreTokens())
        {
            String contactID = tokenizer.nextToken();
            Contact contact
                = opSetPresence2.findContactByID(contactID);
            if(contact == null)
            {
                try
                {
                    opSetPresence2.subscribe(contactID);
                    Object o = new Object();
                    synchronized (o)
                    {
                        o.wait(2000);
                    }
                }
                catch (Exception ex1)
                {
                    continue;
                }
            }
            contact
                = opSetPresence2.findContactByID(contactID);
            opSetBasicIM2.sendInstantMessage(contact,
                opSetBasicIM2.createMessage(message));
        }
    }
public void reportingSendFunMessages ( ) throws OperationFailedException { String hostname = "" ; try { hostname = java . net . InetAddress . getLocalHost ( ) . getHostName ( ) + ": " ; } catch ( UnknownHostException ex ) { } String message = hostname + "Hello this is the SIP Communicator (version " + System . getProperty ( "sip-communicator.version" ) + ") build on: " + new Date ( ) . toString ( ) + ". Have a very nice day!" ; String list = System . getProperty ( "accounts.reporting.JABBER_REPORT_LIST" ) ; logger . debug ( "Will send message " + message + " to: " + list ) ; if ( list == null || list . trim ( ) . length ( ) == 0 ) return ; StringTokenizer tokenizer = new StringTokenizer ( list , " " ) ; while ( tokenizer . hasMoreTokens ( ) ) { String contactID = tokenizer . nextToken ( ) ; Contact contact = opSetPresence2 . findContactByID ( contactID ) ; if ( contact == null ) { try { opSetPresence2 . subscribe ( contactID ) ; Object o = new Object ( ) ; synchronized ( o ) { o . wait ( 2000 ) ; } } catch ( Exception ex1 ) { continue ; } } contact = opSetPresence2 . findContactByID ( contactID ) ; opSetBasicIM2 . sendInstantMessage ( contact , opSetBasicIM2 . createMessage ( message ) ) ; } }
A method that would simply send messages to a group of people so that
 they would get notified that tests are being run.
A method that would simply send messages to a group of people so that they would get notified that tests are being run .
//if no property is specified - return