Check out the new USENIX Web site. next up previous
Next: Problems Up: OrbixWeb Previous: Per-Process Filters

   
Per-Object Filter

Filters can be associated with a given object as well. To define a per-object filter, one defines a Java object that implements the Java interface for the CORBA object that was generated by the IDL compiler. This new Java object implements the desired filters. For example, assume the CORBA object a provides a method m. The IDL compiler generated Java interface includes the declaration of method m. Any per-object filter that can be associated with the class a must implement this interface, including the method m. The association is done by having the implementation of a create an instance of the per-object filter object, and then specify where in the method invocation path the filter is to be invoked. The following demonstrates the association of two per-object filters filter1 and filter2 with an object of class Foo:

1   Foo foo;
2   (( _FooSkeleton) foo)._preObject
       = filter1;
3   (( _FooSkeleton) foo)._postObject
       = filter2;

This mechanism for implementing a per-object filter is simple and elegant. However, as will be discussed in Section 5.2, it is too restrictive for our purposes.




1999-03-21