Package jade.domain.FIPAAgentManagement

Examples of jade.domain.FIPAAgentManagement.ReceivedObject


    //#DOTNET_EXCLUDE_BEGIN
    intendedReceiverPanel.resetContent(envelope.getAllIntendedReceiver());
    //#DOTNET_EXCLUDE_END

    ReceivedObject recObject = envelope.getReceived();
    try{
      param = recObject.getBy();
    }catch(NullPointerException e){
      param = "";
    }
    by.setText(param);
    try{
      param = recObject.getFrom();
    }catch(NullPointerException e){
      param = "";
    }
    fromRec.setText(param);

    try{
      dateRecDate = recObject.getDate();
      param = ISO8601.toString(dateRecDate);
    }catch(NullPointerException e){
      param = "";     
    }
    dateRec.setText(param);

    try{
      param = recObject.getId();
    }catch(NullPointerException e){
      param = "";
    }
    id.setText(param);
    try{
      param = recObject.getVia();
    }catch(NullPointerException e){
      param = "";
    }
    via.setText(param);
  }
View Full Code Here


                return;
              }
            }
           
            // Put a 'received-object' stamp in the envelope
            ReceivedObject ro = new ReceivedObject();
            ro.setBy(accID);
            ro.setDate(new Date());
            env.setReceived(ro);
           
            Iterator it = env.getAllIntendedReceiver();
            // FIXME: There is a problem if no 'intended-receiver' is present,
            // but this should not happen
View Full Code Here

    for (i=env.getAllProperties();i.hasNext();) {
      encodeProp(sb,(Property)i.next());
    }

    //Create tag received
    ReceivedObject ro = env.getReceived();
    if (ro != null) {
      //Create tag received
      sb.append(OT).append(RECEIVED_TAG).append(CT);
      //Date 
      String value = new BasicFipaDateTime(ro.getDate()).toString();
      if (value != null) {
        encodeOneLineTag(sb, RECEIVED_DATE,RECEIVED_ATTR,value);
     
      //By
      if (((value=ro.getBy()) != null)&&(!value.equals(NULL))) {
        encodeOneLineTag(sb, RECEIVED_BY,RECEIVED_ATTR,value);
      }
      //From
      if (((value=ro.getFrom()) != null)&&(!value.equals(NULL))) {
        encodeOneLineTag(sb, RECEIVED_FROM,RECEIVED_ATTR,value);
      }
      //Id
      if (((value=ro.getId()) != null)&&(!value.equals(NULL))) {
        encodeOneLineTag(sb, RECEIVED_ID,RECEIVED_ATTR,value);
      }
      //Via
      if (((value=ro.getVia()) != null)&&(!value.equals(NULL))) {
        encodeOneLineTag(sb, RECEIVED_VIA,RECEIVED_ATTR,value);
      }
      sb.append(ET).append(RECEIVED_TAG).append(CT);
    }
    sb.append(ET).append(PARAMS_TAG).append(CT);
View Full Code Here

    else if (INTENDED_TAG.equalsIgnoreCase(localName))  {
      aid = new AID();
      env.addIntendedReceiver(aid);
    }
    else if (RECEIVED_TAG.equalsIgnoreCase(localName))  {
      ro = new ReceivedObject();
      env.addStamp(ro);
    }
    else if (RECEIVED_BY.equalsIgnoreCase(localName))  {
      ro.setBy(attributes.getValue(RECEIVED_ATTR));
    }
View Full Code Here

      throw new LEAPSerializationException("Error deserializing Properties");
    }   
  }

  private ReceivedObject deserializeReceivedObject() throws LEAPSerializationException {
    ReceivedObject r = new ReceivedObject();
    r.setBy(readString());
    r.setFrom(readString());
    r.setDate(readDate());
    r.setId(readString());
    r.setVia(readString());
    return r;
  }   
View Full Code Here

      for(int i = 0; i < received.length; i++)
  IDLreceived[i] = marshalReceivedObj(received[i]);
      */

      // FIXME: For now, only the current 'received' object is considered...
      ReceivedObject received = env.getReceived();
      FIPA.ReceivedObject[] IDLreceived;
      if(received != null)
  IDLreceived = new FIPA.ReceivedObject[] { marshalReceivedObj(received) };
      else
  IDLreceived = new FIPA.ReceivedObject[] { };
View Full Code Here

    private Property unmarshalProperty(FIPA.Property p) {
      return new Property(p.keyword, p.value.extract_Value());
    }

    private ReceivedObject unmarshalReceivedObj(FIPA.ReceivedObject ro) {
      ReceivedObject result = new ReceivedObject();
      result.setBy(ro.by);
      result.setFrom(ro.from);
      result.setDate(unmarshalDateTime(ro.date));
      result.setId(ro.id);
      result.setVia(ro.via);
      return result;
    }
View Full Code Here

TOP

Related Classes of jade.domain.FIPAAgentManagement.ReceivedObject

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.