[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: [xmlblaster] question about connect method in xmlBlasterAccess.cpp



Marcel Ruff,hello!

	That is in connect() method in xmlBlasterAccess.cpp at line "createDefaultCbServer();".
	In "createDefaultCbServer()" method, you create your CbServer when cbServer_ is null. 
And as a publisher, we always do not need CbServer, so we write like "xmlBlasterAccess.connect(qos, NULL)"
to send a zero pointer to connect() method, but in your codes, you always create one.

	I modified it like this:
		if (updateClient_) createDefaultCbServer();
	Is it right?

======= 2004-09-13 16:48:54 has been wrote:=======

>pikaiyuan wrote:
>> Hi, everyone
>> 
>> 	I got a question in xmlBlasterAccess class in cpp client codes.
>> You created default callback server in both publisher and subscriber
>> (we adjust somebody is publisher or subscriber by reference of I_callback),
>> but in java code, you created default callback server only in subscriber.
>> why? Is it a bug?
>
>C++
>----------------------------------------
> // The default callback with 'this'
> xmlBlasterAccess.connect(qos, this);
>
> // A specific callback with 'callback' for each subscribe
> xmlBlasterAccess.subscribe(const SubscribeKey& key,
>                  const SubscribeQos& qos, I_Callback *callback=0);
>----------------------------------------
>
>
>Java:
>----------------------------------------
> // The default callback with 'this'
> xmlBlasterAccess.connect(qos, this);
>
> // A specific callback for each subscribe
> xmlBlasterAccess.subscribe(sk, sq, new I_Callback() {
>   public String update(String cbSessionId,
>                 UpdateKey updateKey, byte[] content, UpdateQos updateQos) {
>     ...
>   });
>----------------------------------------
>
>
>The C++ and the Java client API is similar,
>what is the bug you mention?
>
>regards
>Marcel
>> 
>> 
>> Thanks for your help.        
>> 		
>> pikaiyuan
>> 2004-09-12	   
>> 
>> 
>
>
>-- 
>http://www.xmlBlaster.org
>

= = = = = = = = = = = = = = = = = = = =
			

Thanks for your help.         
				 
pikaiyuan
pikaiyuan at 163.com
2004-09-13