Borland(R) Enterprise Server VisiBroker(R) デベロッパーズガイド
ポータブルインタセプタの一般的な作成手順を次に示します。
#include "PortableInterceptor_c.hh" class SampleClientRequestInterceptor:public PortableInterceptor::ClientRequestInterceptor { char *name(){ return "SampleClientRequestInterceptor"; } void send_request(ClientRequestInfo_ptr _ri){ .......//actual interceptor code here } void send_poll(ClientRequestInfo_ptr _ri){ .......//actual interceptor code here } void receive_reply(ClientRequestInfo_ptr _ri){ .......//actual interceptor code here } void receive_exception(ClientRequestInfo_ptr _ri){ .......//actual interceptor code here } void receive_other(ClientRequestInfo_ptr _ri){ .......//actual interceptor code here } };
import org.omg.PortableInterceptor.*; public class SampleClientRequestInterceptor extends org.omg.CORBA.LocalObject implements ClientRequestInterceptor { public java.lang.String name(){ return "SampleClientRequestInterceptor"; } public void send_request(ClientRequestInfo ri) throws ForwardRequest { .......//actual interceptor code here } public void send_poll(ClientRequestInfo ri) throws ForwardRequest { .......//actual interceptor code here } public void receive_reply(ClientRequestInfo ri){ .......//actual interceptor code here } public void receive_exception(ClientRequestInfo ri) throws ForwardRequest { .......//actual interceptor code here } public void receive_other(ClientRequestInfo ri) throws ForwardRequest { .......//actual interceptor code here } }
All Rights Reserved. Copyright (C) 2006, Hitachi, Ltd.
COPYRIGHT (C) 1992-2004 Borland Software Corporation. All rights reserved.