KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > impl > invocation > InvocationFactoryImpl


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.server.impl.invocation;
10
11 import javax.servlet.http.HttpServletRequest JavaDoc;
12 import javax.servlet.http.HttpServletResponse JavaDoc;
13
14 import org.jboss.portal.server.PortalServer;
15 import org.jboss.portal.server.ServerManager;
16 import org.jboss.portal.server.config.Configuration;
17 import org.jboss.portal.server.invocation.Invocation;
18 import org.jboss.portal.server.invocation.InvocationFactory;
19
20 /**
21  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
22  * @version $Revision: 1.2 $
23  */

24 public class InvocationFactoryImpl
25    implements InvocationFactory
26 {
27
28    protected final ServerManager manager;
29
30    public InvocationFactoryImpl(ServerManager manager)
31    {
32       this.manager = manager;
33    }
34
35    public Invocation decode(HttpServletRequest JavaDoc req, HttpServletResponse JavaDoc resp)
36    {
37       Configuration config = manager.getConfiguration();
38       int securePort = config.getSecurePort();
39       int nonSecurePort = config.getNonSecurePort();
40       PortalServer container = manager.getPortalServer();
41       Invocation invocation = new InvocationImpl(container, req, resp, nonSecurePort, securePort);
42       return invocation;
43    }
44 }
45
Popular Tags