Examples of Message


Examples of org.springframework.social.showcase.message.Message

  @RequestMapping(value="/signup", method=RequestMethod.GET)
  public SignupForm signupForm(WebRequest request) {
    Connection<?> connection = ProviderSignInUtils.getConnection(request);
    if (connection != null) {
      request.setAttribute("message", new Message(MessageType.INFO, "Your " + StringUtils.capitalize(connection.getKey().getProviderId()) + " account is not associated with a Spring Social Showcase account. If you're new, please sign up."), WebRequest.SCOPE_REQUEST);
      return SignupForm.fromProviderUser(connection.fetchUserProfile());
    } else {
      return new SignupForm();
    }
  }
View Full Code Here

Examples of org.springmodules.xt.model.notification.Message

    }
   
    private void setRules() {
        OfficeIdSpecification idSpecification = new OfficeIdSpecification();
        FullOfficeSpecification fullOfficeSpecification = new FullOfficeSpecification();
        Message wrongIdMessage = new MessageImpl(OfficeErrorCodes.WRONG_ID, Message.Type.ERROR, "officeId" ,"Wrong office id");
        Message fullOfficeMessage = new MessageImpl(OfficeErrorCodes.FULL, Message.Type.ERROR, "employees", "Too many employees");
       
        this.officeSpecification.compose(idSpecification).withMessage(wrongIdMessage, false)
                                           .andNot(fullOfficeSpecification).withMessage(fullOfficeMessage, true);
    }
View Full Code Here

Examples of org.structr.cloud.message.Message

      if (messagesInFlight < CloudService.LIVE_PACKET_COUNT) {

        try {

          final Message message = outputQueue.poll();
          if (message != null) {

            outputStream.writeObject(message);
            outputStream.flush();

            messagesInFlight++;

            message.afterSend(connection);
          }

        } catch (Throwable t) {

          connection.close();
View Full Code Here

Examples of org.switchyard.Message

     * {@inheritDoc}
     */
    @SuppressWarnings("unchecked")
    @Override
    public IndexedRecordBindingData decompose(Exchange exchange, IndexedRecordBindingData target) throws Exception {
        Message sourceMessage = exchange.getMessage();

        getContextMapper().mapTo(exchange.getContext(), target);
        final List<?> content = sourceMessage.getContent(List.class);
        target.getRecord().addAll(content);
        return target;
    }
View Full Code Here

Examples of org.teiid.net.socket.Message

  /**
   * main entry point for remote method calls.
   */
  public void run() {
    Message result = null;
    String loggingContext = null;
    final boolean encrypt = message.getContents() instanceof SealedObject;
        try {
            message.setContents(this.socketClientInstance.getCryptor().unsealObject(message.getContents()));
      if (!(message.getContents() instanceof ServiceInvocationStruct)) {
        throw new AssertionError("unknown message contents"); //$NON-NLS-1$
      }
      final ServiceInvocationStruct serviceStruct = (ServiceInvocationStruct)message.getContents();
      final ClientService clientService = this.csr.getClientService(serviceStruct.targetClass.getName());     
      loggingContext = clientService.getLoggingContext();
      Method m = clientService.getReflectionHelper().findBestMethodOnTarget(serviceStruct.methodName, serviceStruct.args);
      Object methodResult;
      try {
        methodResult = m.invoke(clientService.getInstance(), serviceStruct.args);
      } catch (InvocationTargetException e) {
        throw e.getCause();
      }
      if (ResultsFuture.class.isAssignableFrom(m.getReturnType()) && methodResult != null) {
        ResultsFuture<Object> future = (ResultsFuture<Object>) methodResult;
        future.addCompletionListener(new ResultsFuture.CompletionListener<Object>() {

              public void onCompletion(
                  ResultsFuture<Object> completedFuture) {
                Message asynchResult = new Message();
                try {
                  asynchResult.setContents(completedFuture.get());
                } catch (InterruptedException e) {
                  asynchResult.setContents(processException(e, clientService.getLoggingContext()));
                } catch (ExecutionException e) {
                  asynchResult.setContents(processException(e.getCause(), clientService.getLoggingContext()));
                }
                sendResult(asynchResult, encrypt);
              }

            });
      } else { // synch call
        Message resultHolder = new Message();
        resultHolder.setContents(methodResult);
        result = resultHolder;
      }
    } catch (Throwable t) {
      Message holder = new Message();
      holder.setContents(processException(t, loggingContext));
      result = holder;
    }
   
    if (result != null) {
      sendResult(result, encrypt);
View Full Code Here

Examples of org.terasology.logic.console.Message

            @Override
            public String get() {
                StringBuilder messageList = new StringBuilder();
                Iterator<Message> messageIterator = console.getMessages().iterator();
                while (messageIterator.hasNext()) {
                    Message message = messageIterator.next();
                    messageList.append(FontColor.getColored(message.getMessage(), message.getType().getColor()));
                    messageList.append(Message.NEW_LINE);
                }
                return messageList.toString();
            }
        });
View Full Code Here

Examples of org.umundo.core.Message

      String nowString = sdf.format(now);
      sensor.addMessage(fault);
     
//      System.out.println("Publishing " + sensor);
     
      Message msg = new Message();
      msg.putMeta("id", sensor.id);
      msg.putMeta("lat", sensor.lat.toString());
      msg.putMeta("lon", sensor.lon.toString());
      msg.putMeta("html", sensor.getHTML());
      msg.putMeta("time", nowString);
      msg.putMeta("timeStamp", Long.toString(now.getTime()));
      msg.putMeta("message", sensor.messages.getFirst().message);
      msg.putMeta("severity", Integer.toString(random.nextInt(10)));
      pub.send(msg);
    }
  }
View Full Code Here

Examples of org.uned.agonzalo16.bitacora.domain.Message

  }

  @RequestMapping(method = RequestMethod.GET, value = "/show/{id}")
  public String show(@PathVariable("id") Long id, Model model, @ModelAttribute("userAttribute") AuthenticatedUser user) {
    User authUser = userDao.get(user.getId());
    Message msg = messageDao.get(id);
    model.addAttribute("message", msg);
    model.addAttribute("reply", !msg.getOrigin().equals(authUser));

    if (!msg.getRead() && msg.getDestination().equals(authUser)) {
      msg.setRead(true);
      messageDao.merge(msg);
    }

    return "message/show";
  }
View Full Code Here

Examples of org.vertx.java.core.eventbus.Message

    }
  }

  private void doReceive(final BaseMessage msg, final HandlerHolder holder) {
    // Each handler gets a fresh copy
    final Message copied = msg.copy();

    holder.context.execute(new Runnable() {
      public void run() {
        // Need to check handler is still there - the handler might have been removed after the message were sent but
        // before it was received
View Full Code Here

Examples of org.voltcore.agreement.FakeMesh.Message

            }
        }
        m_nodeState.set(NodeState.RUN);
        while (m_shouldContinue.get())
        {
            Message msg = m_recvQ.poll();
            synchronized(this) {
                if (msg != null) {
                    if (msg.m_close) {
                        int failedHostId = CoreUtils.getHostIdFromHSId(msg.m_src);
                        long agreementHSId = CoreUtils.getHSIdFromHostAndSite(failedHostId,
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.