1/*2 * Copyright 2000-2004 The Apache Software Foundation.3 * 4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.daemon.impl.util.feeddaemon;
1819//jetspeed stuff20import org.apache.jetspeed.services.logging.JetspeedLogFactoryService;
21import org.apache.jetspeed.services.logging.JetspeedLogger;
22import org.apache.jetspeed.services.threadpool.ThreadPool;
23import org.apache.jetspeed.services.Registry;
24import org.apache.jetspeed.om.registry.PortletEntry;
252627/***28Handles taking all known Portlets and then instantiatles them all so that 29everything is in memory.3031@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*/34publicclassEntryInstantiator {
3536privatePortletEntry[] entries = null;
3738/***39 * Static initialization of the logger for this class40 */41privatestaticfinalJetspeedLogger logger = JetspeedLogFactoryService.getLogger(EntryInstantiator.class.getName());
4243/***44 Create a EntryInstantiator for processing.45 */46publicEntryInstantiator( PortletEntry[] entries ) {
47super();
48this.entries = entries;
49 }
5051publicvoid process() {
5253if ( logger.isInfoEnabled() )
54 {
55 logger.info( "BEGIN: EntryInstantiator: Instantiating " +
56 Registry.get(Registry.PORTLET).getEntryCount() +
57" Portlet(s) found in the PortletRegistry" );
58 }
5960for( int i = 0; i < entries.length; ++i ) {
6162Instantiator inst = newInstantiator( i, entries[i] );
63 ThreadPool.process( inst );
6465 }
6667 logger.info( "END: EntryInstantiator: Instantiating all Portlets found in the PortletRegistry" );
6869 }
7071 }
72737475