@Override
        public GuacamoleInstruction filter(GuacamoleInstruction instruction) throws GuacamoleException {

            if (instruction.getOpcode().equals("yes"))
                return instruction;

            return null;
            
        }
Filter which allows through "yes" instructions but drops all others.
guacamole-common/src/test/java/org/apache/guacamole/protocol/FilteredGuacamoleWriterTest.java