HSF 입문 - hsf 서비스 발표 및 호출

5042 단어 타 오 바 오
원문:http://songpo-ath-taobao-com.iteye.com/blog/1405665
   Spring bean    ,      

           HelloWorld Spring Bean, Bean      com.taobao.hsf.test.HelloWorld,               Spring Bean;
    *          Spring Bean XML: 



 

       serviceInterface    [String],          
   
     com.taobao.hsf.test.HelloWorld
   

       target    [ref],      HSF   spring bean id
   
     
   

       serviceVersion     [String],        ,   1.0.0
   
     1.1.0       /    
   

       serviceName     [String],        ,    ,   null
   
     HelloWorldService
   

       serviceDesc     [String],          ,    ,   null
   
     HelloWorldService providered by HSF
   

       serviceGroup     [String],          ,         VIP,   HSF
   
      HSF
   

       supportAsynCall     [true|false],                     
           false,               ,           oneway、future  callback       
   
     false
   

       clientTimeout     [int],                 ,   ms,   3000ms
   
     3000
   

       clientIdleTimeout     [int],               ,   s,   600
   
     60
   

       serializeType     [String(hessian|java)],        ,   hessian
   
     java
   

       methodToInjectConsumerIp     ,        IP   ,              IP   ,         String
   
     setConsumerIP
   

       methodSpecials     ,              ,                   
   
     
       
          
          
       
     
   
 



      XML   Spring   applicationContext   ;
               ,  JBoss, HelloWorld      HSF        。
      :        

   Spring            HSF  

     Spring           com.taobao.hsf.test.HelloWorld,   1.1.0   ,       Spring bean    CallHelloWorld;
    *          Spring Bean XML: 



 

     interfaceName    [String],           
   
     com.taobao.hsf.test.HelloWorld
   

     version     [String],             ,   1.0.0
   
     1.1.0
   

     group     [String],              ,   HSF
   
     HSF
   

     methodSpecials     ,              ,                   
   
     
       
         
         
       
     
   

     target     [String],               
                hsf.runmode=0      ,      ,      ,                     
   
       10.1.6.57:12200?_TIMEOUT=1000
   

asyncallMethods     [List],                                       ,            

   
     

   : name:   ;type:      ;

type   oneway,      :oneway、future、callback、reliable reliablecallback

oneway           ,            ,             ,        ,         

future      Future             ,           ,         ,     Future     

callback              ,            callbackhandler

reliable               , oneway     ,               ,               reliablecallback                 ,               callbackhandler

       name:save
     
   

             ,        HSF     ,          
     public void ${name}_callback(Object invokeContext, Object appResponse, Throwable t),  ${name}               
   

                    ,              setInvokeContext         
   

              ThreadLocal    ,           ThreadLocal          ,     ThreadLocal         
    
 



      XML   Spring   ApplicatonContext    ;
               ,  JBoss,      com.taobao.hsf.test.HelloWorld,   1.1.0    ,   CallHelloWorld ,            

좋은 웹페이지 즐겨찾기