Package jade.core.messaging
Class IncomingEncodingFilter
- java.lang.Object
-
- jade.core.Filter
-
- jade.core.messaging.IncomingEncodingFilter
-
public class IncomingEncodingFilter extends Filter
Class that filters incoming commands related to encoding of ACL messages.- Version:
- $Date$ $Revision$
- Author:
- Jerome Picault - Motorola Labs, Nicolas Lhuillier - Motorola Labs
-
-
Constructor Summary
Constructors Constructor Description IncomingEncodingFilter(Map m, MessagingService svc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(VerticalCommand cmd)Receive a command object for processing.ACLMessagedecodeMessage(Envelope env, byte[] payload)Decodes an endoded ACL message according to the acl-representation described in the envelope.voidpostProcess(VerticalCommand cmd)Post-process a command object after it has been processed by the successive filters in the filter chain.-
Methods inherited from class jade.core.Filter
getPreferredPosition, isBlocking, isSkipping, setBlocking, setPreferredPosition, setSkipping
-
-
-
-
Constructor Detail
-
IncomingEncodingFilter
public IncomingEncodingFilter(Map m, MessagingService svc)
-
-
Method Detail
-
accept
public boolean accept(VerticalCommand cmd)
Receive a command object for processing.- Overrides:
acceptin classFilter- Parameters:
cmd- AVerticalCommanddescribing 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
falsefrom this method. A vetoed command is not propagated in the filter chain.
-
postProcess
public void postProcess(VerticalCommand cmd)
Description copied from class:FilterPost-process a command object after it has been processed by the successive filters in the filter chain.- Overrides:
postProcessin classFilter- Parameters:
cmd- AVerticalCommanddescribing what operation has been requested from previous layers (that can be the actual prime source of the command or previous filters in the chain).
-
decodeMessage
public ACLMessage decodeMessage(Envelope env, byte[] payload) throws MessagingService.UnknownACLEncodingException, ACLCodec.CodecException
Decodes an endoded ACL message according to the acl-representation described in the envelope.- Parameters:
env- the Envelope of the messagepayload- the encoded message- Returns:
- the decoded
ACLMessage - Throws:
MessagingService.UnknownACLEncodingExceptionACLCodec.CodecException
-
-