This class is used to transparently pre and post-pend audit functionality
to any given object reference. It is typically used to check the integrity
of the invocation arguments, or the authenticity of the invoking object.
Likewise, it can review the invocation results, to augment, or delete
certain components. The wrapped object is unaware, and need not be
changed, to assist in this functionality. It can be used on local objects,
for which the code is available, as easily as on remote object references,
for which no code is available. It is ideal for use in debug, and
development activities, as well as for security, in production
environments. The technique is essentially an implementation of the
Decorator design pattern.
The auditor object. This object's preprocess method will be invoked
with the arguments to be provided to the audited object. It has the
Change the arguments
Approve the arguments, as is
Reject the invocation, by throwing an Exception.
The arguments the preprocess method returns will then be passed on to
the audited item for processing. The result of this operation will be
passed to the auditing item's postprocess method. Again, it has the
similiar three options; to change, approve, or reject the returned
data. It is declared as public to allow the reference of the AuditorItem,
and its auditor object, from a single instance of AuditorItem.
This is the object to be audited. Since it has no knowlege of the audit
it's structure need not be changed in any way to accomodate it.
It is declared as public to allow the reference of the AuditorItem, and
its wrapped object, from a single instance of AuditorItem.
This method audits the incoming calls. If the auditor approves, or
change the supplied arguments, they will be passed into the audited
item for processing. The auditor will again review the returned data,
or exception, and will likewise approve or change it. Note:
this method can be called reentrantly. Also, if the audited item
invocation results in an exception, and the auditor approves, it can
simply return the exception, and the wrapper will throw it