Examples of Message


Examples of org.jdesktop.jdic.desktop.Message

    public static void sendMailWithAttachmentDesktop(final String toMail,
            final String subject, final String message,
            final String pathToAttachment) throws ProTransException {
        try {
            //init();
            Message msg = new Message();
            msg.setToAddrs(getToList(toMail));
            msg.setSubject(subject);
            msg.setBody(message);

            List<String> attachList = new ArrayList<String>();
            attachList.add(pathToAttachment);
            msg.setAttachments(attachList);
            Desktop.mail(msg);
        } catch (Exception e) {
            e.printStackTrace();
            throw new ProTransException(e);
        }
View Full Code Here

Examples of org.jdesktop.wonderland.common.messages.Message

                                Message message)
    {
        if (message instanceof CellMessage) {
            messageReceived(sender, clientID, (CellMessage) message);
        } else {
            Message error = new ErrorMessage(message.getMessageID(),
                    "Unexpected message type: " + message.getClass());

            sender.send(clientID, error);
        }
    }
View Full Code Here

Examples of org.jgroups.Message

     * into the send queue and let one or more worker threads handle it. A worker thread
     * then removes the Message from the send queue, performs a conversion and adds the
     * modified Message to the send queue of the layer below it, by calling Down).
     */
    public Object down(Event evt) {
        Message msg;
        Address dest_addr;


        switch(evt.getType()) {

        case Event.MSG:
            if(done) {
                break;
            }
            msg=(Message)evt.getArg();
            dest_addr=msg.getDest();
            if(dest_addr == null)
                num_msgs++;
            if(num_msgs >= expected_msgs) {
                stop=System.currentTimeMillis();
                synchronized(this) {
View Full Code Here

Examples of org.jibx.ws.wsdl.model.Message

            Operation op = new Operation(oname);
            op.setDocumentation(odef.getDocumentation());
            op.setSoapAction(odef.getSoapAction());
           
            // generate input message information
            Message rqmsg = new Message(odef.getRequestMessageName(), wns);
            op.addInputMessage(rqmsg);
            def.addMessage(rqmsg);
            QName rqelem = null;
            if (m_generationParameters.isDocLit()) {
               
                // check if input parameter defined for method
                ArrayList parms = odef.getParameters();
                if (parms.size() > 0) {
                   
                    // check for existing element definition matching the parameter type
                    ValueCustom parm = (ValueCustom)parms.get(0);
                    rqelem = (QName)classelems.get(parm.getWorkingType());
                    if (rqelem == null) {
                       
                        // create new element for parameter
                        ElementElement pelem = buildValueElement(parm, ptypemap, typeschemas, holder);
                        schema.getTopLevelChildren().add(pelem);
                        rqelem = pelem.getQName();
                       
                    } else {
                       
                        // import and use existing element definition
                        imports.add(elemschemas.get(rqelem));
                        addSchemaReference(rqelem, elemschemas, holder);
                       
                    }
                }
               
            } else {
               
                // construct a sequence for wrapped method parameters
                SequenceElement seq = new SequenceElement();
                ArrayList parms = odef.getParameters();
                for (int j = 0; j < parms.size(); j++) {
                    ValueCustom parm = (ValueCustom)parms.get(j);
                    String type = parm.getWorkingType();
                    ElementElement pelem;
                    if (!typemap.containsKey(type)) {
                       
                        // add predefined mapping type to known types and require schema import
                        QName tname = (QName)classtypes.get(type);
                        if (tname != null) {
                            typemap.put(type, tname);
                            imports.add(typeschemas.get(tname));
                        }
                       
                    }
                    pelem = buildValueElement(parm, ptypemap, typeschemas, holder);
                    seq.getParticleList().add(pelem);
                }
               
                // add corresponding schema definition to schema
                ComplexTypeElement tdef = new ComplexTypeElement();
                tdef.setContentDefinition(seq);
                ElementElement elem = new ElementElement();
                String wname = odef.getRequestWrapperName();
                elem.setName(wname);
                elem.setTypeDefinition(tdef);
                schema.getTopLevelChildren().add(elem);
                rqelem = new QName(sns, wname);
               
            }
           
            // add part definition to message (if present)
            if (rqelem != null) {
                MessagePart part = new MessagePart("part", rqelem);
                rqmsg.getParts().add(part);
                def.addNamespace(rqelem.getUri());
            }
           
            // generate output message information
            Message rsmsg = new Message(odef.getResponseMessageName(), wns);
            op.addOutputMessage(rsmsg);
            def.addMessage(rsmsg);
            ValueCustom rtrn = odef.getReturn();
            QName rselem = null;
            if (m_generationParameters.isDocLit()) {
               
                // check if return value defined for method
                if (!"void".equals(rtrn.getWorkingType())) {
                   
                    // check for existing element definition matching the return type
                    rselem = (QName)classelems.get(rtrn.getWorkingType());
                    if (rselem == null) {
                       
                        // create new element for return
                        ElementElement relem = buildValueElement(rtrn, ptypemap, typeschemas, holder);
                        schema.getTopLevelChildren().add(relem);
                        rselem = relem.getQName();
                       
                    } else {
                       
                        // import and use existing element definition
                        imports.add(elemschemas.get(rselem));
                        addSchemaReference(rqelem, elemschemas, holder);
                       
                    }
                }
               
            } else {
               
                // add corresponding schema definition to schema
                SequenceElement seq = new SequenceElement();
                if (!"void".equals(rtrn.getWorkingType())) {
                    ElementElement relem = buildValueElement(rtrn, ptypemap, typeschemas, holder);
                    seq.getParticleList().add(relem);
                }
                ComplexTypeElement tdef = new ComplexTypeElement();
                tdef.setContentDefinition(seq);
                ElementElement elem = new ElementElement();
                String wname = odef.getResponseWrapperName();
                elem.setName(wname);
                elem.setTypeDefinition(tdef);
                schema.getTopLevelChildren().add(elem);
                rselem = new QName(sns, wname);
               
            }
           
            // add part definition to message (if present)
            if (rselem != null) {
                MessagePart part = new MessagePart("part", rselem);
                rsmsg.getParts().add(part);
                def.addNamespace(rselem.getUri());
            }
           
            // process fault message(s) for operation
            ArrayList thrws = odef.getThrows();
            WsdlCustom wsdlcustom = m_generationParameters.getWsdlCustom();
            for (int j = 0; j < thrws.size(); j++) {
                ThrowsCustom thrw = (ThrowsCustom)thrws.get(j);
                String type = thrw.getType();
                Message fmsg = (Message)fltmap.get(type);
                if (fmsg == null) {
                   
                    // first time for this throwable, create the message
                    FaultCustom fault = wsdlcustom.forceFaultCustomization(type);
                    QName fqname = new QName(sns, fault.getElementName());
                    MessagePart part = new MessagePart("fault", fqname);
                    fmsg = new Message(fault.getFaultName(), wns);
                    fmsg.getParts().add(part);
                    def.addMessage(fmsg);
                    def.addNamespace(sns);
                   
                    // make sure the corresponding mapping exists
                    BindingMappingDetail detail = m_bindingGenerator.getMappingDetail(fault.getDataType());
View Full Code Here

Examples of org.jivesoftware.smack.packet.Message

            ChatManager chatmanager = connection.getChatManager();
            Chat chat = chatmanager.createChat(toUser, null);

            try {
                // google bounces back the default message types, you must use chat
                Message msg = new Message(toUser, Message.Type.chat);
                msg.setBody(text);
                chat.sendMessage(msg);
                System.out.println("Message Sended");
            } catch (XMPPException e) {
                System.out.println("Failed to send message");
                // handle this how?
View Full Code Here

Examples of org.joget.apps.app.model.Message

        String key = getCacheKey(messageKey, locale, appDefinition.getId(), appDefinition.getVersion().toString());
       
        if (cache.containsKey(key)) {
            return cache.get(key);
        } else {
            Message message = loadById(messageKey + Message.ID_SEPARATOR + locale, appDefinition);
            cache.put(key, message);
            return message;
        }
    }
View Full Code Here

Examples of org.jpokemon.server.Message

      for (ActionSet actionSet : entity.getActionSets("step")) {
        try {
          actionSet.execute(player);
        }
        catch (ServiceException e) {
          PlayerManager.pushMessage(player, new Message("error", e.getMessage()));
        }
      }
    }

    player.setLocation(location);
View Full Code Here

Examples of org.jresearch.gossip.beans.forum.Message

     */
    public Message getMessage(String mid) throws SQLException {
        Connection connection = this.dataSource.getConnection();
        PreparedStatement st = connection.prepareStatement(dbDriver
                .getQueries().getForumQueries().getSql_GET_MESSAGE());
        Message mess = null;
        ResultSet rs = null;

        try {
            st.setInt(1, Integer.parseInt(mid));
            rs = st.executeQuery();

            if (rs.next()) {
                mess = new Message();
                mess.setCentents(rs.getString("centents"));
                mess.setHeading(rs.getString("heading"));
                mess.setId(rs.getInt("id"));
                mess.setIntime(rs.getDate("intime"));
                mess.setIp(rs.getString("ip"));
                mess.setSender(rs.getString("sender"));
            }
        } finally {
            if (rs != null) {
                rs.close();
            }
View Full Code Here

Examples of org.kie.api.builder.Message

                 "   @duration( getProperties().get( 'duration' )+1 ) \n" +
                "end\n";
       
        KnowledgeBase kbase = loadKnowledgeBaseFromString( rule );
        StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
        Message msg = new Message();
        Properties props = new Properties();
        props.put("timestamp",
                  new Integer(99));
        props.put( "duration",
                   new Integer( 52 ) );
        msg.setProperties(props);

        EventFactHandle efh = (EventFactHandle) ksession.insert( msg );
        assertEquals( 98,
                      efh.getStartTimestamp() );
        assertEquals( 53,
View Full Code Here

Examples of org.mime4j.message.Message

    }
   
    public static void main(String[] args) {
        try {
           
            final Message message = new Message(new FileInputStream(args[0]));
           
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI(message);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.