Examples of Message


Examples of br.gov.frameworkdemoiselle.message.Message

  private transient  Logger logger;

  @Override
  public void add(final Message message, Object... params) {
    Message aux;

    if (params != null) {
      aux = new DefaultMessage(message.getText(), message.getSeverity(), params);
    } else {
      aux = message;
View Full Code Here

Examples of ca.uhn.hl7v2.model.Message

        return new RouteBuilder() {
            public void configure() throws Exception {
                from("mina2:tcp://127.0.0.1:" + getPort() + "?sync=true&codec=#hl7codec")
                    .process(new Processor() {
                        public void process(Exchange exchange) throws Exception {
                            Message input = exchange.getIn().getBody(Message.class);

                            assertEquals("2.4", input.getVersion());
                            QRD qrd = (QRD)input.get("QRD");
                            assertEquals("0101701234", qrd.getWhoSubjectFilter(0).getIDNumber().getValue());

                            Message response = createHL7AsMessage();
                            exchange.getOut().setBody(response);
                        }
                    })
                    .to("mock:result");
            }
View Full Code Here

Examples of ch.njol.skript.localization.Message

 
  public CommandHelp(final String command, final Color argsColor, final String langNode) {
    this.command = command;
    this.argsColor = "" + argsColor.getChat();
    this.langNode = langNode;
    description = new Message(langNode + "." + DEFAULTENTRY);
  }
View Full Code Here

Examples of ch.softappeal.yass.core.remote.Message

    try {
      if (packet.isEnd()) {
        close(null);
        return;
      }
      final Message message = packet.message();
      if (message instanceof Request) {
        serverInvoke(packet.requestNumber(), (Request)message);
      } else { // Reply
        writeReply(packet.requestNumber(), (Reply)message);
      }
View Full Code Here

Examples of ch.usi.dslab.bezerra.netwrapper.Message

     
      // skip the buffer length parameter
      buffer.position(buffer.position() + 4);
     
      Input in = new Input(new ByteBufferInputStream(buffer));
      Message msg = (Message) kryo.readClassAndObject(in);
      in.close();
      msg.rewind();
      return msg;
   }
View Full Code Here

Examples of chatbot.client.Message

 
  @Override
  protected void onMessage(String channel, String sender, String login, String hostname, String payload) {
    logger.info("Recieved message [" + payload + "]");
    for (MessageListener listener : this.messageListeners) {
      Message message = new Message(sender, payload);
      listener.onMessageReceived(message);
    }
  }
View Full Code Here

Examples of chrriis.dj.nativeswing.swtimpl.Message

  @Override
  protected Message readMessageFromChannel() throws IOException, ClassNotFoundException {
    Object o = ois.readUnshared();
    if(o instanceof Message) {
      Message message = (Message)o;
      if(IS_DEBUGGING_MESSAGES) {
        System.err.println("RECV: " + SWTNativeInterface.getMessageID(message) + ", " + message);
      }
      return message;
    }
View Full Code Here

Examples of classes.Message

            //Stream for keyboard read
            BufferedReader _keyboardStream = new BufferedReader(new InputStreamReader(System.in));
            //Addition params...
            String _tmpMessage = DefaultParams.getDelimiter();
            String _tmpCall = "";
            Message _mess = new Message(_tmpMessage);
            Boolean _isWaitForInput = true;
            Boolean _isWasInput = true;
           
            //Commands
            System.out.println("*** Commands ***");
            System.out.println("** " + DefaultParams.getCommandLogin() + " - command for login");
            System.out.println("** " + DefaultParams.getCommandLogout() + " - command for logout");
            System.out.println("** " + DefaultParams.getCommandSendTo() + " - persnal message for user (4ex: print '" + DefaultParams.getCommandSendTo() + "USER_NAME Text_Message')");
            System.out.println("** " + DefaultParams.getCommandUserList() + " - show active users");
            System.out.println("** " + DefaultParams.getCommandExit() + " - quit");
           
            while (true) {
              _isWaitForInput = true;
              _isWasInput = true;
              /* Global command
                 * **/
                if (_mess.getCommand().equals(DefaultParams.getCommandClearConsole())){//Login and clean console
              clearConsole();
              System.out.println("You are online. Please press Enter for continue...");
           
              _mess = null;
              _mess = new Message(DefaultParams.getCommandMess() + DefaultParams.getDelimiter());
           }else if (_mess.getCommand().equals(DefaultParams.getCommandError())){//Get error
               System.out.print(_mess.getValue());
           
               _mess = null;
               _mess = new Message(/*DefaultParams.getCommandMess() + */DefaultParams.getDelimiter());
            }
                else if (_mess.getCommand().equals(DefaultParams.getCommandPrint())){//Print message
               System.out.print(_mess.getValue());
           
               _mess = null;
               _mess = new Message(/*DefaultParams.getCommandMess() + */DefaultParams.getDelimiter());
            _isWaitForInput = false;
            }else if (_mess.getCommand().equals(DefaultParams.getCommandName())){//Input user name
              System.out.print(_mess.getValue());
             
              _mess = new Message(DefaultParams.getCommandName() + DefaultParams.getDelimiter());
           }else if (_mess.getCommand().equals(DefaultParams.getCommandPass())){//Input password
             System.out.print(_mess.getValue());
            
             _mess = new Message(DefaultParams.getCommandPass() + DefaultParams.getDelimiter());
          }else{
            //Input messagies
                  System.out.print(_mess.getValue());
             
                  _mess = new Message(DefaultParams.getCommandMess() + DefaultParams.getDelimiter());
             }
              
                /* Input from console
                 * **/   
                if(_isWaitForInput){ 
                  while(_isWasInput/*!Thread.currentThread().isInterrupted()*/){
                        try {
                            if (_keyboardStream.ready()) {
                              _tmpMessage = _keyboardStream.readLine();
                              _isWasInput = false;
                            }else{
                              try{
                                //Ping server jedes 1 sec
                                Thread.sleep(DefaultParams.getPingServer());
                                //Send string to server
                                _outputDataStream.writeUTF(DefaultParams.getCommandCall());
                                  _outputDataStream.flush();
                                  //Read answer
                                  _tmpCall = _inputDataStream.readUTF();
                                  //if we need to show message....
                                  if(!_tmpCall.equals(DefaultParams.getCommandEmpty())){
                                    System.out.println(_tmpCall);
                                  }
                              } catch (InterruptedException e){}
                            }
                        } catch (Exception e) {
                            try {
                                Thread.currentThread().wait(500);
                            } catch (InterruptedException e1) {
                              System.out.println(e.getMessage());
                            }
                        }
                    }
                }
                _tmpMessage = _mess.getCommand() + DefaultParams.getDelimiter() + _tmpMessage;
                _isWasInput = true;

                _mess = null;
                _mess = new Message(_tmpMessage);
               
              /* Send to server
               * **/
              _outputDataStream.writeUTF(_mess.getCurrentStr()); // �������� ��������� ������ ������ �������.
                _outputDataStream.flush(); // ���������� ����� ��������� �������� ������.
               
                /* Waiting for server
                 * **/
                _tmpMessage = _inputDataStream.readUTF(); // ���� ���� ������ ������ ������ ������.
               
                _mess = null;
                _mess = new Message(_tmpMessage);
            }
        } catch (Exception x) {
            x.printStackTrace();
        }
    }  
View Full Code Here

Examples of client.model.Message

      BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in));
      while (true) {
        String inputText;
        try {
          inputText = buffer.readLine();
          msg = new Message(ClientConfig.LOGIN, inputText);
          Client.messagesList.add(msg);
        } catch (IOException e) {

          e.printStackTrace();
        }
View Full Code Here

Examples of client.model.utils.Message

     * @param password the player password as a String
     * @return a new Player if it's created, otherwise null.
     * @throws GameException that inform
     */
    public Player newPlayer(String email, String password) throws GameException {
        Message serverResponse = servProtocol.sendRequest(Message.NEW_ACCOUNT, email + "_" + password);

        if (serverResponse != null) {
            switch (serverResponse.getHeader()) {
                case Message.NEW_ACCOUNT_SUCCESS:
                    // Return the new instance of the current player
                    return new Player(email, password, new String(serverResponse.getBody()));
                default:
                    exceptionTriggered(serverResponse.getHeader());
            }
        } else {
            throw new GameException(GameException.typeErr.CONN_KO);
        }
        return null;
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.