Examples of Message


Examples of org.objectweb.joram.shared.messages.Message

  /** The various elements to monitor. */
  private Vector elements = new Vector();

  public void retrieve(ReliableTransmitter transmitter) throws Exception {
    Message message = new Message();
    MonitoringHelper.getJMXValues(message, elements);
    List list = new ArrayList(1);
    list.add(message);
    transmitter.transmit(list, null);
  }
View Full Code Here

Examples of org.olat.modules.fo.Message

      // => it is a file element, typeName format: 'path=/test1/test2/readme.txt'
      return true;
    } else if ((ores != null) && ores.getResourceableTypeName().equals( OresHelper.calculateTypeName(Message.class) ) ) {
      // it is message => check message access
      Long resourceableId = ores.getResourceableId();
      Message message = ForumManager.getInstance().loadMessage(resourceableId);
      Message threadtop = message.getThreadtop();
      if(threadtop==null) {
        threadtop = message;
      }
      boolean isMessageHidden = Status.getStatus(threadtop.getStatusCode()).isHidden();
      //assumes that if is owner then is moderator so it is allowed to see the hidden forum threads   
      //TODO: (LD) fix this!!! - the contextEntry is not the right context for this check
      boolean isOwner = ManagerFactory.getManager().isIdentityPermittedOnResourceable(identity, Constants.PERMISSION_ACCESS,  contextEntry.getOLATResourceable());
      if(isMessageHidden && !isOwner) {
        return false;
View Full Code Here

Examples of org.opends.messages.Message

      switch (t) {
      case STARTUP:
        // This is fine.
        break;
      default:
        Message message = ERR_INITIALIZE_PLUGIN.get(String.valueOf(t));
        throw new ConfigException(message);
      }
    }

    // Register change listeners. These are not really necessary for
View Full Code Here

Examples of org.openhab.binding.maxcube.internal.message.Message

        if (raw == null) {
          cont = false;
          continue;
        }

        Message message;
        try {
          message = processRawMessage(raw);

          message.debug(logger);

          if (message != null) {
            if (message.getType() == MessageType.M) {
              M_Message msg = (M_Message) message;
              for (DeviceInformation di : msg.devices) {
                Configuration c = null;
                for (Configuration conf : configurations) {
                  if (conf.getSerialNumber().equalsIgnoreCase(di.getSerialNumber())) {
                    c = conf;
                    break;
                  }
                }

                if (c != null) {
                  configurations.remove(c);
                }

                c = Configuration.create(di);
                configurations.add(c);

                c.setRoomId(di.getRoomId());
              }
            } else if (message.getType() == MessageType.C) {
              Configuration c = null;
              for (Configuration conf : configurations) {
                if (conf.getSerialNumber().equalsIgnoreCase(((C_Message) message).getSerialNumber())) {
                  c = conf;
                  break;
                }
              }

              if (c == null) {
                configurations.add(Configuration.create(message));
              } else {
                c.setValues((C_Message) message);
              }
            } else if (message.getType() == MessageType.L) {
              Collection<? extends Device> tempDevices = ((L_Message) message).getDevices(configurations);

              for (Device d : tempDevices) {
                Device existingDevice = findDevice(d.getSerialNumber(), devices);
                if (existingDevice == null) {
View Full Code Here

Examples of org.openid4java.message.Message

        ParameterList request = new ParameterList(req.getParameterMap());

        String mode = request.hasParameter("openid.mode") ?
                request.getParameterValue("openid.mode") : null;

        Message response;
        String responseText;

        if ("associate".equals(mode))
        {
            // --- process an association request ---
            response = manager.associationResponse(request);
            responseText = response.keyValueFormEncoding();
        }
        else if ("checkid_immediate".equals(mode))
        {
          String userSelectedClaimedId = (String) request.getParameter("openid.claimed_id").getValue();
         
            String realm = (String) request.getParameter("openid.realm").getValue();
           
            if (!isTrustedRealm(realm, userSelectedClaimedId)) {
                response = DirectError.createDirectError("checkid_immediate is not supported");
                responseText = response.keyValueFormEncoding();
                directResponse(resp, responseText);
                return;
            }
         
            // --- process an authentication request ---
            AuthRequest authReq = null;
            try {
                authReq = AuthRequest.createAuthRequest(request, manager.getRealmVerifier());
            } catch (Exception ex) {
              throw new ServletException(ex);
            }

            String opLocalId = null;
            // if the user chose a different claimed_id than the one in request
            if (userSelectedClaimedId != null &&
                userSelectedClaimedId.equals(authReq.getClaimed()))
            {
                //opLocalId = lookupLocalId(userSelectedClaimedId);
            }
           
            response = manager.authResponse(request,
                    opLocalId,
                    userSelectedClaimedId,
                    true,
                    false); // Sign after we added extensions.

            if (response instanceof DirectError)
                responseText = response.keyValueFormEncoding();
            else
            {
                // Sign the auth success message.
                // This is required as AuthSuccess.buildSignedList has a `todo' tag now.
              try {
                    manager.sign((AuthSuccess) response);
              } catch (Exception ex) {
                throw new ServletException(ex);
              }
                responseText = response.keyValueFormEncoding();
            }
        }
        else
        {
          // unsupported mode
            // --- error response ---
            response = DirectError.createDirectError("Unknown request");
            responseText = response.keyValueFormEncoding();
        }

        directResponse(resp, responseText);
  }
View Full Code Here

Examples of org.osforce.connect.entity.message.Message

 
  @RequestMapping("/detail-view")
  @Permission({"message-view"})
  public String doDetailView(@RequestParam Long messageId,
      @RequestAttr User user, Model model, WebRequest request) {
    Message message = messageService.getMessage(messageId);
    String box = (String) request.getAttribute("box", WebRequest.SCOPE_REQUEST);
    if("inbox".equals(box)) {
      message.setReadBy(user);
      message.setRead(true);
      messageService.updateMessage(message);
    }
    model.addAttribute(AttributeKeys.MESSAGE_KEY_READABLE, message);
    return "message/message-detail";
  }
View Full Code Here

Examples of org.owasp.webscarab.model.Message

        partList.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent evt) {
                if (evt.getValueIsAdjusting()) return;
                if (_editable && _mp.isModified() && _selected > -1) {
                    _modified = true;
                    Message message = _mp.getMessage();
                    _content.set(_selected, message);
                    _partsList.fireContentsChanged(_selected, _selected);
                }
                _selected = partList.getSelectedIndex();
                if (_selected < 0)
                    return;
                Message message = _content.get(_selected);
                _mp.setMessage(message);
                invalidate();
                revalidate();
            }
        });
View Full Code Here

Examples of org.pdf4j.saxon.instruct.Message

            }
        }
        if (select == null) {
            select = new StringLiteral("xsl:message (no content)");
        }
        Message inst = new Message(select, terminate);
        return inst;
    }
View Full Code Here

Examples of org.phoenixdb.io.network.Message

     * @throws IOException
     */
    public Result prepare(String queryString) throws Error, IOException
    {
        log.fine(String.format("Preparing query '%s'", queryString));
        Message msg = new Message.Query(0, queryString, afl, "", false);
        net.write(msg);
        msg = net.read();

        switch (msg.getHeader().messageType)
        {
            case Message.mtQueryResult:
                log.fine("Got result from server");
                Result res = new Result((QueryResult) msg, this);
                _queryId = res.getQueryId();
                return res;

            case Message.mtError:
                log.fine("Got error message from server");
                throw new Error((Message.Error) msg);

            default:
                log.severe("Got unhandled network message during execution");
                throw new Error(String.format("Can not handle network message '%s'",
                        msg.getHeader().messageType));
        }
    }
View Full Code Here

Examples of org.planx.routing.messaging.Message

        QueueMessage myMessage = (QueueMessage) incoming;
        OriginMessage mess = (OriginMessage) incoming;
      System.out.println("TestReceiver.java: TestMessage \""+myMessage.toString()+ "\" recieved at " + local.toString() + " from " + mess.getOrigin());
        Node origin = mess.getOrigin();       
        //List nodes = space.getClosestNodes(mess.getLookupId());
        Message reply = new InReplyMessage(local,"","Test");
        server.reply(comm, reply, origin.getInetAddress(), origin.getPort());
        System.out.println("ReplyMessage sent to " + origin.toString() + " from " + local.toString());
    }
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.