home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / TRIAL / JBUILDER / JVISBRKR.Z / TimerClientInterceptor.java < prev    next >
Encoding:
Java Source  |  1998-05-08  |  2.3 KB  |  65 lines

  1. /*
  2.  * Copyright (c) 1997-1998 Borland International, Inc. All Rights Reserved.
  3.  * 
  4.  * This SOURCE CODE FILE, which has been provided by Borland as part
  5.  * of a Borland product for use ONLY by licensed users of the product,
  6.  * includes CONFIDENTIAL and PROPRIETARY information of Borland.  
  7.  *
  8.  * USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS 
  9.  * OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
  10.  * THE PRODUCT.
  11.  *
  12.  * IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD BORLAND, ITS RELATED
  13.  * COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY CLAIMS
  14.  * OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR DISTRIBUTION
  15.  * OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES ARISING OUT OF
  16.  * OR RESULTING FROM THE USE, MODIFICATION, OR DISTRIBUTION OF PROGRAMS
  17.  * OR FILES CREATED FROM, BASED ON, AND/OR DERIVED FROM THIS SOURCE
  18.  * CODE FILE.
  19.  */
  20. package visibroker.samples.interceptor.timer;
  21.  
  22. import com.visigenic.vbroker.interceptor.*;
  23. import com.visigenic.vbroker.GIOP.*;
  24.  
  25. public class TimerClientInterceptor extends TimerInterceptor implements ClientInterceptor
  26. {
  27.     public void prepare_request(RequestHeaderHolder hdr, Closure closure)
  28.     {
  29.         begin(closure, ((RequestHeader)hdr.value).operation);
  30.     }
  31.  
  32.     public org.omg.CORBA.portable.OutputStream send_request(RequestHeader hdr, org.omg.CORBA.portable.OutputStream buf, Closure closure)
  33.     {
  34.         delta(closure, "prepare time");
  35.         return null;
  36.     }
  37.  
  38.     public void send_request_failed(RequestHeader hdr, org.omg.CORBA.Environment env, Closure closure)
  39.     {
  40.         delta(closure, "send time");
  41.     }
  42.  
  43.     public void send_request_succeeded(RequestHeader hdr, Closure closure)
  44.     {
  45.         delta(closure, "send time");
  46.     }
  47.  
  48.     public org.omg.CORBA.portable.InputStream receive_reply(ReplyHeader hdr, org.omg.CORBA.portable.InputStream buf, org.omg.CORBA.Environment env, Closure closure)
  49.     {
  50.         delta(closure, "receive time");
  51.         complete(closure, "total call");
  52.         return null;
  53.     }
  54.  
  55.     public void receive_reply_failed(int req_id, org.omg.CORBA.Environment env, Closure closure)
  56.     {
  57.         delta(closure, "receive time");
  58.         complete(closure, "total call");
  59.     }
  60.  
  61.     public void exception_occurred(int req_id, org.omg.CORBA.Environment env, Closure closure)
  62.     {
  63.     }
  64. }
  65.