Examples of Message


Examples of info.walnutstreet.vs.ps02.model.remote.Message

     
      @Override
      public void run() {
        MessageInterface message;
        try {
          message = new Message();
          message.setCrypted(crypotSwitch);
          message.setSender(chatMemberModelInterface);
          message.setReceiver(nickname);
          message.setMessage(messageText);
         
View Full Code Here

Examples of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.Message

     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataByteArrayInputStream dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

        Message info = (Message)o;

        info.beforeUnmarshall(wireFormat);
       
        info.setProducerId((ProducerId)looseUnmarsalCachedObject(wireFormat, dataIn));
        info.setDestination((ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
        info.setTransactionId((TransactionId)looseUnmarsalCachedObject(wireFormat, dataIn));
        info.setOriginalDestination((ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
        info.setMessageId((MessageId)looseUnmarsalNestedObject(wireFormat, dataIn));
        info.setOriginalTransactionId((TransactionId)looseUnmarsalCachedObject(wireFormat, dataIn));
        info.setGroupID(looseUnmarshalString(dataIn));
        info.setGroupSequence(dataIn.readInt());
        info.setCorrelationId(looseUnmarshalString(dataIn));
        info.setPersistent(dataIn.readBoolean());
        info.setExpiration(looseUnmarshalLong(wireFormat, dataIn));
        info.setPriority(dataIn.readByte());
        info.setReplyTo((ActiveMQDestination)looseUnmarsalNestedObject(wireFormat, dataIn));
        info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn));
        info.setType(looseUnmarshalString(dataIn));
        info.setContent(looseUnmarshalBuffer(dataIn));
        info.setMarshalledProperties(looseUnmarshalBuffer(dataIn));
        info.setDataStructure((DataStructure)looseUnmarsalNestedObject(wireFormat, dataIn));
        info.setTargetConsumerId((ConsumerId)looseUnmarsalCachedObject(wireFormat, dataIn));
        info.setCompressed(dataIn.readBoolean());
        info.setRedeliveryCounter(dataIn.readInt());

        if (dataIn.readBoolean()) {
            short size = dataIn.readShort();
            BrokerId value[] = new BrokerId[size];
            for( int i=0; i < size; i++ ) {
                value[i] = (BrokerId)looseUnmarsalNestedObject(wireFormat,dataIn);
            }
            info.setBrokerPath(value);
        }
        else {
            info.setBrokerPath(null);
        }
        info.setArrival(looseUnmarshalLong(wireFormat, dataIn));
        info.setUserID(looseUnmarshalString(dataIn));
        info.setRecievedByDFBridge(dataIn.readBoolean());

        info.afterUnmarshall(wireFormat);

    }
View Full Code Here

Examples of io.iron.ironmq.Message

    private IronMQEndpoint endpoint;

    @Test
    public void testConsumeBatch() throws Exception {
        for (int counter = 0; counter < 6; counter++) {
            Message message = new Message();
            message.setBody("{\"body\": \"Message " + counter + "\"}");
            message.setId("f6fb6f99-5eb2-4be4-9b15-144774141458" + counter);
            ((MockQueue)endpoint.getQueue()).add(message);
        }

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(5);
View Full Code Here

Examples of ioke.lang.Message

        register();
    }

    public Object invokeWithArgs(Object[] args) throws Throwable {
        IokeObject msg = ioke.newMessage("invoke");
        Message invoke = (Message) IokeObject.data(msg);

        List<Runtime.RescueInfo> pendingRescues = new ArrayList<Runtime.RescueInfo>();
        IokeObject rr = IokeObject.as(((Message) IokeObject.data(ioke.mimic)).sendTo(ioke.mimic, ioke.ground, ioke.rescue), ioke.ground);
        List<Object> conds = new ArrayList<Object>();
        conds.add(lang.pendingCondition);
        pendingRescues.add(new Runtime.RescueInfo(rr, conds, pendingRescues, ioke.getBindIndex()));
        ioke.registerRescues(pendingRescues);


        List<Runtime.RescueInfo> failureRescues = new ArrayList<Runtime.RescueInfo>();
        IokeObject rr2 = IokeObject.as(((Message) IokeObject.data(ioke.mimic)).sendTo(ioke.mimic, ioke.ground, ioke.rescue), ioke.ground);
        List<Object> failureConds = new ArrayList<Object>();
        failureConds.add(lang.failedExpectationCondition);
        failureRescues.add(new Runtime.RescueInfo(rr2, failureConds, failureRescues, ioke.getBindIndex()));
        ioke.registerRescues(failureRescues);

        try {
            return invoke.sendTo(msg, iokeStepDefObject, iokeStepDefObject, multilineArg(args));
        } catch (ControlFlow.Rescue e) {
            if (e.getRescue().token == pendingRescues) {
                throw lang.cucumberPending("TODO");
            } else if (e.getRescue().token == failureRescues) {
                throw lang.error("IokeException", ((Message) IokeObject.data(ioke.reportMessage)).sendTo(ioke.reportMessage, ioke.ground, e.getCondition()).toString());
View Full Code Here

Examples of iryrwarosh.Message

    terminal.writeCenter("Message Log", 0);
    for (int i = 0; i < 22; i++){
      if (scroll + i >= messages.size())
        break;
     
      Message m = messages.get(scroll + i);
      Color color = (GainedFame.class.isAssignableFrom(m.getClass())) ? AsciiPanel.brightYellow : Common.guiForeground;
     
      if (SaidOutLoud.class.isAssignableFrom(m.getClass()))
        color = ((SaidOutLoud)m).creature.color();
     
      terminal.write(clean(m.text()), 1, i+2, color, null);
    }
  }
View Full Code Here

Examples of jabber.client.Message

                    }
                });

                scheduledThreadPoolExecutor.submit(task);

                Message message = createXmppMessage(to, messageDispatch);
                if (message != null) {
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Sending message to XMPP client from: " + message.getFrom() + " to: " + message.getTo() + " type: " + message.getType() + " with body: " + message.getAny());
                    }
                    transport.marshall(message);
                }
            }
        });
View Full Code Here

Examples of javax.jms.Message

    super(pJDBC, pDBUser, pDBPass, pQueueName);
  }
 
  public void Receive()
  {
    Message JmsMsg;
    Log4jMsg Log4jMsg;
   
    if (dbConn.connected == false)
    {
      logger.fatal("Connection not established - Impossible to receive");
View Full Code Here

Examples of javax.mail.Message

      throw new RuntimeException("Opening Transport", e);
    }
    try {
        InternetAddress address = new InternetAddress(email);

        Message msg = new MimeMessage(session);

        msg.setFrom(new InternetAddress(configuration.getFromAddress()));

        msg.setRecipient(Message.RecipientType.TO, address);
        String title = "GVS Login Link";
        try {
          msg.setSubject(MimeUtility.encodeText(title, "UTF-8", null));
        } catch (UnsupportedEncodingException e) {
          throw new RuntimeException(e);

        }
        msg.setSentDate(new java.util.Date());
        // create and fill the first message part

        MimeBodyPart plainTextVersion = new MimeBodyPart();
        plainTextVersion.setDataHandler(new DataHandler(textDataSource));

        MimeBodyPart htmlPart = new MimeBodyPart();
        htmlPart.setDataHandler(new DataHandler(htmlDataSource));
        // create the Multipart
        // and its parts to it
        Multipart bodyAlternatives = new MimeMultipart("alternative");
        bodyAlternatives.addBodyPart(plainTextVersion);
        htmlPart.setHeader("Content-Type", "text/html; charset=UTF-8");
        bodyAlternatives.addBodyPart(htmlPart);



        // mbp1.setHeader("Content-Language", "fr");
        // add the Multipart to the message
        Multipart mainMultipart = new MimeMultipart();
        BodyPart body = new MimeBodyPart();
        body.setContent(bodyAlternatives);
        mainMultipart.addBodyPart(body);

        // mainMultipart.addBodyPart(getSerialializerRDFPart(mailModel));

        msg.setContent(mainMultipart);
        log.debug("mesage ready, sending");
        Transport.send(msg);
        /*
         * Reusing conncection: (problem:isp limits) Address[] recipients = new
         * Address[1]; recipients[0] = recipient; transport.sendMessage(msg,
View Full Code Here

Examples of javax.management.remote.message.Message

      HandshakeBeginMessage begin =
    new HandshakeBeginMessage(serverProfiles, serverVersion);
      mc.writeMessage(begin);

      while (true) {
    Message msg = mc.readMessage();
    if (msg instanceof HandshakeErrorMessage) {
        // Throw exception and let GenericConnectorServer
        // close the connection
        //
        sendError = false;
        HandshakeErrorMessage error = (HandshakeErrorMessage) msg;
        AdminClient.throwExceptionOnError(error);
    } else if (msg instanceof HandshakeEndMessage) {
        HandshakeEndMessage cend = (HandshakeEndMessage) msg;
        Object ccontext = cend.getContext();
        if (logger.traceOn()) {
      logger.trace("connectionOpen",
             ">>>>> Handshake End <<<<<");
      logger.trace("connectionOpen",
             "Client Context Object [ " +
             ccontext + " ]");
        }
        Object scontext = (Object) env.get("jmx.remote.context");
        // If MessageConnection is an instance of SocketConnectionIf
        // then set the authenticated subject.
        if (mc instanceof SocketConnectionIf) {
      ((SocketConnectionIf)mc).setSubject(subject);
        }
        String connectionId = mc.getConnectionId();
        // If the environment includes an authenticator, check
        // that it accepts the connection id, and replace the
        // Subject by whatever it returns.
        JMXAuthenticator authenticator =
      (JMXAuthenticator) env.get("jmx.remote.authenticator");
        if (authenticator != null) {
      Object[] credentials = {connectionId, subject};
      subject = authenticator.authenticate(credentials);
      if (mc instanceof SocketConnectionIf) {
          ((SocketConnectionIf)mc).setSubject(subject);
      }
      connectionId = mc.getConnectionId();
        }
        if (logger.traceOn()) {
      logger.trace("connectionOpen",
             "Server Context Object [ " +
             scontext + " ]");
      logger.trace("connectionOpen",
             "Server Connection Id [ " +
             connectionId + " ]");
        }

        // Check that the negotiated profiles are acceptable for
        // the server's defined security policy. This method is
        // called just before the initial handshake is completed
        // with a HandshakeEndMessage sent from the server to the
        // client. If the method throws an exception, then a
        // HandshakeErrorMessage will be sent instead.
        //
        List profileNames = getProfilesByName(mc);
        CheckProfiles np = (CheckProfiles)
      env.get("com.sun.jmx.remote.profile.checker");
        if (np != null) {
      np.checkProfiles(env,
           profileNames,
           ccontext,
           connectionId);
        } else {
      checkProfilesForEquality(serverProfiles,
             profileNames);
        }

        HandshakeEndMessage send =
      new HandshakeEndMessage(scontext, connectionId);
        mc.writeMessage(send);
        break;
    } else if (msg instanceof VersionMessage) {
        VersionMessage cjmxmp = (VersionMessage) msg;
        String clientVersion = cjmxmp.getVersion();
        if (clientVersion.equals(serverVersion)) {
      VersionMessage sjmxmp =
          new VersionMessage(serverVersion);
      mc.writeMessage(sjmxmp);
        } else {
      throw new IOException("Protocol version " +
                "mismatch: Client [" +
                clientVersion +
                "] vs. Server [" +
                serverVersion + "]");
        }
    } else if (msg instanceof ProfileMessage) {
        ProfileMessage pm = (ProfileMessage) msg;
        String pn = pm.getProfileName();
        ProfileServer p = (ProfileServer) getProfile(mc, pn);
        if (p == null) {
      p = ProfileServerFactory.createProfile(pn, env);
      if (logger.traceOn()) {
          logger.trace("connectionOpen",
           ">>>>> Profile " +
           p.getClass().getName() +
           " <<<<<");
      }
      p.initialize(mc, subject);
      putProfile(mc, p);
        }
        p.consumeMessage(pm);
        pm = p.produceMessage();
        mc.writeMessage(pm);
        if (p.isComplete()) {
      subject = p.activate();
        }
    } else {
        throw new IOException("Unexpected message: " +
            msg.getClass().getName());
    }
      }
      putSubject(mc, subject);
  } catch (Exception e) {
      if (sendError) {
View Full Code Here

Examples of javax.wireless.messaging.Message

     *     <code>BINARY_MESSAGE</code>.
     * @param addr the destination address of the message.
     * @return a new <code>Message</code> object.
     */
    public Message newMessage(String type, String addr) {
  Message message = null;

  if (type.equals(MessageConnection.TEXT_MESSAGE)) {

      message = new TextObject(addr);
  } else {
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.