home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-05-08 | 3.0 KB | 87 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.IOP.*;
- import com.visigenic.vbroker.GIOP.*;
- import org.omg.CORBA.portable.*;
-
- public class TimerServerInterceptor extends TimerInterceptor implements ServerInterceptor
- {
- public IOR locate(int req_id, byte[] object_key, Closure closure)
- {
- closure.object = new TimerData();
- return null;
- }
-
- public void locate_succeeded(int req_id, Closure closure)
- {
- print("locate", null, closure.object);
- }
-
- public void locate_forwarded(int req_id, IORHolder forward_ior, Closure closure)
- {
- print("locate", null, closure.object);
- }
-
- public IOR locate_failed(int req_id, byte[] object_key, Closure closure)
- {
- print("locate", null, closure.object);
- return null;
- }
-
- public InputStream receive_request(RequestHeader hdr, org.omg.CORBA.ObjectHolder target, InputStream buf, Closure closure)
- {
- begin(closure, hdr.operation);
- return null;
- }
-
- public void prepare_reply(RequestHeader hdr, ReplyHeaderHolder reply, org.omg.CORBA.Object target, Closure closure)
- {
- delta(closure, "process time");
- }
-
- public org.omg.CORBA.portable.OutputStream send_reply(RequestHeader reqHdr, ReplyHeader hdr, org.omg.CORBA.Object target, OutputStream buf, org.omg.CORBA.Environment env, Closure closure)
- {
- delta(closure, "prepare response");
- return null;
- }
-
- public void send_reply_failed(RequestHeader reqHdr, ReplyHeader replyHdr, org.omg.CORBA.Object target, org.omg.CORBA.Environment env, Closure closure)
- {
- delta(closure, "send time");
- }
-
- public void request_completed(RequestHeader reqHdr, org.omg.CORBA.Object target, Closure closure)
- {
- delta(closure, "send time");
- complete(closure, "total call");
- }
-
- public void shutdown(com.visigenic.vbroker.interceptor.ServerInterceptorPackage.ShutdownReason reason)
- {
- }
-
- public void exception_occurred(RequestHeader reqHdr, org.omg.CORBA.Environment env, Closure closure)
- {
- }
- }
-