KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > xfire > XFireYanFacade


1 package jfun.yan.xfire;
2
3 import jfun.yan.Container;
4
5 import org.codehaus.xfire.service.binding.ObjectServiceFactory;
6
7 /**
8  * Facade class to bridge Yan with Xfire.
9  * <p>
10  * @author Ben Yu
11  * Jan 31, 2006 12:29:46 PM
12  */

13 public class XFireYanFacade {
14   /**
15    * Create a ServiceFactory instance that uses a Yan container to
16    * instantiate servant instances.
17    * @param yan the yan container object.
18    * @param scope the scoping policy for each servant object.
19    * @return the ServiceFactory instance.
20    */

21   public static ObjectServiceFactory getServiceFactory(Container yan, ScopePolicy scope){
22     return new DecoratingObjectServiceFactory(new YanServiceDecorator(yan, scope));
23   }
24 }
25
Popular Tags