home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-05-08 | 2.3 KB | 65 lines |
- /*
- * Copyright (c) 1997-1998 Borland International, Inc. All Rights Reserved.
- *
- * This SOURCE CODE FILE, which has been provided by Borland as part
- * of a Borland product for use ONLY by licensed users of the product,
- * includes CONFIDENTIAL and PROPRIETARY information of Borland.
- *
- * USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS
- * OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
- * THE PRODUCT.
- *
- * IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD BORLAND, ITS RELATED
- * COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY CLAIMS
- * OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR DISTRIBUTION
- * OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES ARISING OUT OF
- * OR RESULTING FROM THE USE, MODIFICATION, OR DISTRIBUTION OF PROGRAMS
- * OR FILES CREATED FROM, BASED ON, AND/OR DERIVED FROM THIS SOURCE
- * CODE FILE.
- */
- package visibroker.samples.interceptor.timer;
-
- import com.visigenic.vbroker.interceptor.*;
- import com.visigenic.vbroker.GIOP.*;
-
- public class TimerClientInterceptor extends TimerInterceptor implements ClientInterceptor
- {
- public void prepare_request(RequestHeaderHolder hdr, Closure closure)
- {
- begin(closure, ((RequestHeader)hdr.value).operation);
- }
-
- public org.omg.CORBA.portable.OutputStream send_request(RequestHeader hdr, org.omg.CORBA.portable.OutputStream buf, Closure closure)
- {
- delta(closure, "prepare time");
- return null;
- }
-
- public void send_request_failed(RequestHeader hdr, org.omg.CORBA.Environment env, Closure closure)
- {
- delta(closure, "send time");
- }
-
- public void send_request_succeeded(RequestHeader hdr, Closure closure)
- {
- delta(closure, "send time");
- }
-
- public org.omg.CORBA.portable.InputStream receive_reply(ReplyHeader hdr, org.omg.CORBA.portable.InputStream buf, org.omg.CORBA.Environment env, Closure closure)
- {
- delta(closure, "receive time");
- complete(closure, "total call");
- return null;
- }
-
- public void receive_reply_failed(int req_id, org.omg.CORBA.Environment env, Closure closure)
- {
- delta(closure, "receive time");
- complete(closure, "total call");
- }
-
- public void exception_occurred(int req_id, org.omg.CORBA.Environment env, Closure closure)
- {
- }
- }
-