/** * Implements the communication protocol between the caller and the data * source (notification and agent) based on tags. Implementations are * expected to map the provided attribute name to some aspect of the * notification payload. The later is defined by method prime. * * @param tagName the tag of the attribute the value of which is required **/ public Object get(String tagName) throws MappingFailedException { Object o = this.payload.get(tagName); if (o == null) throw new MappingFailedException("Tag \"" + tagName + "\" not found"); // Check whether value returned is a dynamic content accessor. If not // return as is. If yes invoke the accessor and return that value if (o instanceof DynamicContentAccessor) { DynamicContentAccessor d = (DynamicContentAccessor)o; return d.get(); } else { return o; } } //get
/** * Implements the communication protocol between the caller and the data * source (notification and agent) based on tags. Implementations are * expected to map the provided attribute name to some aspect of the * notification payload. The later is defined by method prime. * * @param tagName the tag of the attribute the value of which is required **/ public Object get(String tagName) throws MappingFailedException { Object o = this.payload.get(tagName); if (o == null) throw new MappingFailedException("Tag \"" + tagName + "\" not found"); // Check whether value returned is a dynamic content accessor. If not // return as is. If yes invoke the accessor and return that value if (o instanceof DynamicContentAccessor) { DynamicContentAccessor d = (DynamicContentAccessor)o; return d.get(); } else { return o; } } //get