Package com.exedosoft.plat.agent.message

Examples of com.exedosoft.plat.agent.message.SimpleMessage


  }

 
  private Message getInMessage(){
   
    SimpleMessage sm = null;
    try {
      ObjectInputStream serverInputStream = new ObjectInputStream(getSocket()
          .getInputStream());
      sm = (SimpleMessage) serverInputStream.readObject();
    } catch (UnknownHostException e) {
View Full Code Here


   */
  public static void main(String[] args) {
   
    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

  /*
   * Test method for 'com.jbbis.hulft.agent.command.tcp.MessageCommand.excute(Message)'
   */
  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

  public Message perform(Message aMessage) {
   
   
   
    SimpleMessage sm = SimpleMessage.wrapperSimpeMessage();
    sm.setMessageName("From Task1=============");
    return sm;
   
  }
View Full Code Here

public class SimpleTask1 implements Task {

  public Message perform(Message aMessage) throws Exception {
   
    SimpleMessage sm = SimpleMessage.wrapperSimpeMessage();
    sm.setMessageName("From Task2=============");
    return sm;
   
  }
View Full Code Here

  private void outMessage(Message aMsg) {

    try {

      SimpleMessage sm = (SimpleMessage) this.message;
      if (sm.getASocket() == null) {
        return;
      }
      if (sm.getASocket().isClosed()) {
        return;
      }
      if (aMsg == null) {
        sm.getASocket().close();
        return;
      }

      ObjectOutputStream serverOutputStream = new ObjectOutputStream(sm
          .getASocket().getOutputStream());
      serverOutputStream.writeObject(aMsg);
      sm.getASocket().close();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of com.exedosoft.plat.agent.message.SimpleMessage

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.