Class OutgoingEncodingFilter


  • public class OutgoingEncodingFilter
    extends Filter
    Class that filters outgoing commands related to the encoding of ACL messages
    Version:
    $Date$ $Revision$
    Author:
    Jerome Picault - Motorola Labs, Nicolas Lhuillier - Motorola Labs
    • Method Detail

      • accept

        public boolean accept​(VerticalCommand cmd)
        Process the SEND_MESSAGE VCommand encoding the ACLMessage with the proper representation and adjusting Envelope fields: 1) If the receiver lives in the local container --> Do not encode (to speed up performances) --> Don't touch the envelope 2) If the receiver lives in a remote container --> Encode using the specified representation or "LEAP" if no representation is specified --> If an envelope is present adjust its fields 3) If the receiver lives in a remote platform --> Encode using the specified representation or "String" if no representation is specified --> Create a default envelope if not present and adjust its fields
        Overrides:
        accept in class Filter
        Parameters:
        cmd - A VerticalCommand describing what operation has been requested from previous layers (that can be the actual prime source of the command or previous filters in the chain).
        Returns:
        A boolean value, telling whether the filtered command has been accepted or not. A filter can veto a command by returning false from this method. A vetoed command is not propagated in the filter chain.
      • postProcess

        public void postProcess​(VerticalCommand cmd)
        Description copied from class: Filter
        Post-process a command object after it has been processed by the successive filters in the filter chain.
        Overrides:
        postProcess in class Filter
        Parameters:
        cmd - A VerticalCommand describing what operation has been requested from previous layers (that can be the actual prime source of the command or previous filters in the chain).
      • prepareEnvelope

        public void prepareEnvelope​(ACLMessage msg,
                                    AID receiver,
                                    GenericMessage gmsg)
        This method puts into the envelope the missing information if required