home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / TRIAL / JBUILDER / JVISBRKR.Z / TimerBindInterceptor.java < prev    next >
Encoding:
Java Source  |  1998-05-08  |  2.2 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.IOP.*;
  24.  
  25. public class TimerBindInterceptor extends TimerInterceptor implements BindInterceptor
  26. {
  27.     public boolean bind(IORHolder ior, org.omg.CORBA.Object object, Closure closure)
  28.     {
  29.         closure.object = new TimerData();
  30.         return false;
  31.     }
  32.  
  33.     public boolean bind_failed(IORHolder ior, org.omg.CORBA.Object object, Closure closure)
  34.     {
  35.         print("bind", null, closure.object);
  36.         return false;
  37.     }
  38.  
  39.     public void bind_succeeded(IOR ior, org.omg.CORBA.Object object,Closure closure)
  40.     {
  41.         print("bind", null, closure.object);
  42.     }
  43.  
  44.     public boolean rebind(IORHolder ior, org.omg.CORBA.Object object, Closure closure)
  45.     {
  46.         closure.object = new TimerData();
  47.         return false;
  48.     }
  49.  
  50.     public boolean rebind_failed(IORHolder ior, org.omg.CORBA.Object object, Closure closure)
  51.     {
  52.         print("rebind", null, closure.object);
  53.         return false;
  54.     }
  55.  
  56.     public void rebind_succeeded(IOR ior, org.omg.CORBA.Object object, Closure closure)
  57.     {
  58.         print("rebind", null, closure.object);
  59.     }
  60.  
  61.     public void exception_occurred(IOR ior, org.omg.CORBA.Object object, org.omg.CORBA.Environment env, Closure closure)
  62.     {
  63.     }
  64. }
  65.