Object instance = null ;
boolean is_topic= false ;
boolean is_instance = false ;
Subscriber sub_temp ;
SubscriberImpl sub_impl_temp ;
DataReader DR ;
Class typehelper = null ;
Class type_param_extract [] = new Class [1 ];
java.lang.Object valu_param_extract[] = new java.lang.Object[1];
Iterator It ;
if(data.type().equal(TopicHelper.type()))
{
is_topic = true ;
topic = TopicHelper.extract(data) ;
}
else
{
is_instance = true ;
valu_param_extract[0] = data ;
type_param_extract[0] = Any.class ;
try{
typehelper = Class.forName(topic.get_type_name()+"Helper") ;
Method extract = typehelper.getMethod("extract",type_param_extract);
instance = extract.invoke(null ,valu_param_extract);
}
catch(Exception e)
{
e.printStackTrace();
}
}
if(is_topic){
Lookup_Sub_interesded_of_topic(topic.get_name());
}
else if( is_instance)
{
try{
It = all_Sub.iterator() ;
while(It.hasNext()){
sub_temp = (Subscriber)It.next() ;
sub_impl_temp = (SubscriberImpl)poa.reference_to_servant(sub_temp);
sub_impl_temp.setInstance(instance);
DR = sub_temp.lookup_datareader(topic.get_name());
DR.take_instance_from_subscriber() ;
if(DR.get_listener()!= null ){
DR.get_listener().on_data_available(DR);
}
}
all_Sub.removeAllElements();
}
catch (Exception e){