Package com.exedosoft.plat.agent

Examples of com.exedosoft.plat.agent.Message


 
  @Override
  public Message excute(Message aMsg) {

   
    Message aMessage = null;
    try {
      ObjectOutputStream serverOutputStream = new ObjectOutputStream(
          getSocket().getOutputStream());
      serverOutputStream.writeObject(aMsg);
     
View Full Code Here


    MessageCommand mc = new MessageCommand();
   
    SimpleMessage sm = SimpleMessage.wrapperSimpeMessage();
    sm.setCommndID(mc.getCommandID());
   
    Message aMsg = mc.excute(sm);

   
    MessageCommand mc1 = new MessageCommand();
    SimpleMessage sm1 = SimpleMessage.wrapperSimpeMessage();
    sm1.setCommndID(mc1.getCommandID());
    sm1.setMessageType(Message.MSG_RES);
    Message aMsg1 = mc1.excute(sm1);

  }
View Full Code Here

  public void testExcute() {
    MessageCommand mc1 = new MessageCommand();
    SimpleMessage sm1 = SimpleMessage.wrapperSimpeMessage();
    sm1.setCommndID(mc1.getCommandID());
    sm1.setMessageType(Message.MSG_REQ);
    Message aMsg1 = mc1.excute(sm1);

   

  }
View Full Code Here

      return;
    }

    List<Task> excuteOverList = new ArrayList<Task>();

    Message aMsg = null;
    for (Iterator it = this.getTasks().iterator(); it.hasNext();) {

      Task aTask = (Task) it.next();
      try {
        aMsg = aTask.perform(this.message);
View Full Code Here

    int needMessage = HumletGlobals.getProcessMax()
        - this.getMessages().size();
    if (needMessage > 0) {
      for (int i = 0; i < needMessage; i++) {
        if (!InQueue.getPool().isEmpty()) {
          Message pollMessage = InQueue.getPool().takeMessage();
          putMessage(pollMessage);
        }else{
          break;
        }
      }
View Full Code Here

  public synchronized Message getMessage(String cmdID) {
   
    if (cmdID == null) {
      return null;
    }
    Message msg = msgs.get(cmdID);
  //  msgs.remove(cmdID);
    return msg;
  }
View Full Code Here

  public synchronized Message getAndRemoveMessage(String cmdID) {
   
    if (cmdID == null) {
      return null;
    }
    Message msg = msgs.get(cmdID);
    msgs.remove(cmdID);
    return msg;
  }
View Full Code Here

  private void outMessage(String aCmdID){
   
    try {
      ObjectOutputStream serverOutputStream = new ObjectOutputStream(
          aSocket.getOutputStream());
      Message msg = OutPool.getPool().getAndRemoveMessage(aCmdID);
      serverOutputStream.writeObject(msg);
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of com.exedosoft.plat.agent.Message

Copyright © 2018 www.massapicom. 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.