[omniORB] some experiences with interceptors

Francesco.Chicchiricco@nokia.com Francesco.Chicchiricco@nokia.com
Sat, 20 Oct 2001 14:33:17 +0300


Hello,
I spent this morning trying to do something something with interceptors in
omniORB4.
Here my results.

First of all, this call has to be issued after the ORB initialization:

    	omniInterceptors *interceptors=omniORB::getInterceptors();

including either <omniORB4/omniInterceptors.h>.

Then interceptors have to be installed.

	interceptors->clientSendRequest.add(clientSendRequest);
    	interceptors->clientReceiveReply.add(clientReceiveReply);

(I found these elements in omniInterceptors.h). Obviously, now the
intercepted functions should be specified as, for example

	CORBA::Boolean
clientSendRequest(omniInterceptors::clientSendRequest_T::info_T& info) {
  		cout << "SendRequest " << endl;
  
  		return true;
	}

	CORBA::Boolean
clientReceiveReply(omniInterceptors::clientReceiveReply_T::info_T& info) {
  		cout << "ReceiveReply " << endl;

  		return true;
	}

Now problems start. 

1- For what I've seen, clientReceiveReply and serverSendRequest have not
been implemented yet. I hope they will be done soon...
Are the interceptors listed in omniInterceptors the only ones that will be
included? I mean, isn't there something like "clientAfterMarshal" or
"serverBeforeUnmarshal"?

2- At least in clientSendRequest there is info_T& info that can be used,
best of all to access to

 	info.giopstream.outputMessageSize();

, that sould be the size of the message going over the network. 
But the file giopStream.cc wasn't been compiled and the only occurrence of
this class in the include is in omniInterceptors.h as empty forward
declaration.

Must I just wait for a while for the completion? 
Are my operations correct?
Will others interceptors added in the future?

OK, I think that for today it's enough...

Bye!

##############################################
             Per aspera ad sidera
##############################################