Examples of Message


Examples of org.apache.sling.i18n.impl.Message

        }
    }

    @Test
    public void testChangesDetection() throws RepositoryException {
        new Message("", MSG_KEY, "DE_message", false).add(deRoot);
        new Message("", MSG_KEY, "FR_message", false).add(frRoot);
        session.save();
        assertMessages("DE_message", "FR_message");

        new Message("", MSG_KEY, "DE_changed", false).add(deRoot);
        new Message("", MSG_KEY, "FR_changed", false).add(frRoot);
        session.save();
        assertMessages("DE_changed", "FR_changed");
    }
View Full Code Here

Examples of org.apache.soap.messaging.Message

            result.setDataType(SampleResult.TEXT);
            result.setSamplerData(fileContents);// WARNING - could be large

            Envelope msgEnv = Envelope.unmarshall(rdoc);
            // create a new message
            Message msg = new Message();
            result.sampleStart();
            SOAPHTTPConnection spconn = null;
            // if a blank HeaderManager exists, try to
            // get the SOAPHTTPConnection. After the first
            // request, there should be a connection object
            // stored with the cookie header info.
            if (this.getHeaderManager() != null && this.getHeaderManager().getSOAPHeader() != null) {
                spconn = (SOAPHTTPConnection) this.getHeaderManager().getSOAPHeader();
            } else {
                spconn = new SOAPHTTPConnection();
            }

            spconn.setTimeout(getTimeoutAsInt());

            // set the auth. thanks to KiYun Roe for contributing the patch
            // I cleaned up the patch slightly. 5-26-05
            if (getAuthManager() != null) {
                if (getAuthManager().getAuthForURL(getUrl()) != null) {
                    AuthManager authmanager = getAuthManager();
                    Authorization auth = authmanager.getAuthForURL(getUrl());
                    spconn.setUserName(auth.getUser());
                    spconn.setPassword(auth.getPass());
                } else {
                    log.warn("the URL for the auth was null." + " Username and password not set");
                }
            }
            // check the proxy
            String phost = "";
            int pport = 0;
            // if use proxy is set, we try to pick up the
            // proxy host and port from either the text
            // fields or from JMeterUtil if they were passed
            // from command line
            if (this.getUseProxy()) {
                if (this.getProxyHost().length() > 0 && this.getProxyPort() > 0) {
                    phost = this.getProxyHost();
                    pport = this.getProxyPort();
                } else {
                    if (System.getProperty("http.proxyHost") != null || System.getProperty("http.proxyPort") != null) {
                        phost = System.getProperty("http.proxyHost");
                        pport = Integer.parseInt(System.getProperty("http.proxyPort"));
                    }
                }
                // if for some reason the host is blank and the port is
                // zero, the sampler will fail silently
                if (phost.length() > 0 && pport > 0) {
                    spconn.setProxyHost(phost);
                    spconn.setProxyPort(pport);
                    if (PROXY_USER.length()>0 && PROXY_PASS.length()>0){
                        spconn.setProxyUserName(PROXY_USER);
                        spconn.setProxyPassword(PROXY_PASS);
                    }
                }
            }
            // by default we maintain the session.
            spconn.setMaintainSession(true);
            msg.setSOAPTransport(spconn);
            msg.send(this.getUrl(), this.getSoapAction(), msgEnv);
            @SuppressWarnings("unchecked") // API uses raw types
            final Map<String, String> headers = spconn.getHeaders();
            result.setResponseHeaders(convertSoapHeaders(headers));

            if (this.getHeaderManager() != null) {
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.email.Message

        mailer.setHost(host);
        mailer.setPort(port);
        mailer.setUser(user);
        mailer.setPassword(password);
        mailer.setSSL(ssl);
        Message mymessage = new Message(message);
        mymessage.setProject(project);
        mailer.setMessage(mymessage);
        mailer.setFrom(new EmailAddress(from));
        mailer.setReplyToList(replyToList);
        Vector toList = vectorizeEmailAddresses(toString);
        mailer.setToList(toList);
View Full Code Here

Examples of org.apache.tuscany.core.message.Message

        builder.connect(sourceFactory, targetFactory, JavaContextFactory.class, true, scopeCtx);
        source.build();
        target.build();
        Assert.assertNotNull(source.getTargetInvoker());
       
        Message msg = msgFactory.createMessage();
        msg.setBody("foo");
        msg.setTargetInvoker(source.getTargetInvoker());
        Message response = source.getHeadInterceptor().invoke(msg);
        Assert.assertEquals("foo", response.getBody());
        Assert.assertEquals(1, sourceRequestHandler.getCount());
        Assert.assertEquals(1, sourceResponseHandler.getCount());
        Assert.assertEquals(1, sourceInterceptor.getCount());
        Assert.assertEquals(1, targetRequestHandler.getCount());
        Assert.assertEquals(1, targetResponseHandler.getCount());
View Full Code Here

Examples of org.apache.tuscany.sca.invocation.Message

    }   
   
    @Override
    public void callAsync(String op, Element e) {
        // Asynchronously invoke the named operation on the endpoint reference
        Message message = mf.createMessage();
        message.setBody(new Object[]{e});
       
        // Generate MESSAGE_ID here.
        // String messageID = "myuniqueid";
        String messageID = UUID.randomUUID().toString();
        message.getHeaders().put(Constants.MESSAGE_ID, messageID);
       
        // save the message id ready for when we process the response       
        asyncMessageMap.put(messageID, op);
       
        // We could add implementation specific headers here if required
View Full Code Here

Examples of org.apache.tuscany.spi.wire.Message

                        args[i] = is.readObject();
                    }
                    Map<Operation<?>, InboundInvocationChain> chains = getInboundWire().getInvocationChains();
                    for (InboundInvocationChain chain : chains.values()) {
                        if (chain.getOperation().getName().equals(operation)) {
                            Message message = new MessageImpl();
                            message.setTargetInvoker(chain.getTargetInvoker());
                            message.setBody(args);
                            message = chain.getHeadInterceptor().invoke(message);
                            os = new ObjectOutputStream(clientSocket.getOutputStream());
                            os.writeObject(message.getBody());
                            os.flush();
                        }
                    }
                } catch (IOException e) {
                    throw new TestBindingRuntimeException(e);
View Full Code Here

Examples of org.apache.twill.internal.state.Message

  private void processMessage(final String path, final String messageId) {
    Futures.addCallback(zkClient.getData(path), new FutureCallback<NodeData>() {
      @Override
      public void onSuccess(NodeData result) {
        Message message = MessageCodec.decode(result.getData());
        if (message == null) {
          LOG.error("Failed to decode message for " + messageId + " in " + path);
          listenFailure(zkClient.delete(path, result.getStat().getVersion()));
          return;
        }
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumCnxManager.Message

                this.manager = manager;
            }

            public void run() {
               
              Message response;
              while (true) {
                    // Sleeps on receive
                try{
                  response = manager.recvQueue.take();
                 
View Full Code Here

Examples of org.ardverk.dht.message.Message

      public void run() {
        Decoder decoder = null;
        try {
          decoder = codec.createDecoder(src,
              new ByteArrayInputStream(data));
          Message message = decoder.read();
         
          if (message instanceof RequestMessage) {
            handleRequest((RequestMessage)message);
          } else {
            handleResponse((ResponseMessage)message);
View Full Code Here

Examples of org.aspectj.bridge.Message

          inJar.close();
        }
        inJar.close();
      }
    } catch (FileNotFoundException ex) {
      IMessage message = new Message("Could not find input jar file " + inFile.getPath() + ", ignoring", new SourceLocation(
          inFile, 0), false);
      world.getMessageHandler().handleMessage(message);
    } catch (IOException ex) {
      IMessage message = new Message("Could not read input jar file " + inFile.getPath() + "(" + ex.getMessage() + ")",
          new SourceLocation(inFile, 0), true);
      world.getMessageHandler().handleMessage(message);
    } finally {
      if (inJar != null) {
        try {
          inJar.close();
        } catch (IOException ex) {
          IMessage message = new Message("Could not close input jar file " + inFile.getPath() + "(" + ex.getMessage()
              + ")", new SourceLocation(inFile, 0), true);
          world.getMessageHandler().handleMessage(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.