class BaseSubsystem extends AnnotatedSubsystem<M> {

   @Request(Capability.CMD_GET_ATTRIBUTES)
   public MessageBody getAttributes(
         @Named("names") Set<String> names,
         SubsystemContext<M> context
   ) {
      Map<String, Object> attributes;
      if(names == null || names.isEmpty()) {
         attributes = context.model().toMap();
      }
      else {
         Set<String> attributeNames = new HashSet<>();
         Set<String> attributeNamespaces = new HashSet<>();
         for(String name: names) {
            if(Utils.isNamespaced(name)) {
               attributeNames.add(name);
            }
            else {
               attributeNamespaces.add(name);
            }
         }
         
         attributes = new HashMap<String, Object>();
         for(Map.Entry<String, Object> entry: context.model().toMap().entrySet()) {
            String name = entry.getKey();
            if(attributeNames.contains(name)) {
               attributes.put(name, entry.getValue());
            }
            else if(attributeNamespaces.contains(Utils.getNamespace(name))){
               attributes.put(name, entry.getValue());
            }
         }
      }

      filterPrivateAttributes(attributes);
      return MessageBody.buildMessage(Capability.EVENT_GET_ATTRIBUTES_RESPONSE, attributes);
   }

}