1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.daemon.impl.util.feeddaemon;
18
19
20 import org.apache.jetspeed.services.logging.JetspeedLogFactoryService;
21 import org.apache.jetspeed.services.logging.JetspeedLogger;
22 import org.apache.jetspeed.services.threadpool.ThreadPool;
23 import org.apache.jetspeed.services.Registry;
24 import org.apache.jetspeed.om.registry.PortletEntry;
25
26
27 /***
28 Handles taking all known Portlets and then instantiatles them all so that
29 everything is in memory.
30
31 @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
32 @version $Id: EntryInstantiator.java,v 1.16 2004/02/23 02:47:27 jford Exp $
33 */
34 public class EntryInstantiator {
35
36 private PortletEntry[] entries = null;
37
38 /***
39 * Static initialization of the logger for this class
40 */
41 private static final JetspeedLogger logger = JetspeedLogFactoryService.getLogger(EntryInstantiator.class.getName());
42
43 /***
44 Create a EntryInstantiator for processing.
45 */
46 public EntryInstantiator( PortletEntry[] entries ) {
47 super();
48 this.entries = entries;
49 }
50
51 public void process() {
52
53 if ( logger.isInfoEnabled() )
54 {
55 logger.info( "BEGIN: EntryInstantiator: Instantiating " +
56 Registry.get(Registry.PORTLET).getEntryCount() +
57 " Portlet(s) found in the PortletRegistry" );
58 }
59
60 for( int i = 0; i < entries.length; ++i ) {
61
62 Instantiator inst = new Instantiator( i, entries[i] );
63 ThreadPool.process( inst );
64
65 }
66
67 logger.info( "END: EntryInstantiator: Instantiating all Portlets found in the PortletRegistry" );
68
69 }
70
71 }
72
73
74
75