com.googlecode.fascinator.portal.services.cache
Class JythonCacheEntryFactory

java.lang.Object
  extended by com.googlecode.fascinator.portal.services.cache.JythonCacheEntryFactory
All Implemented Interfaces:
net.sf.ehcache.constructs.blocking.CacheEntryFactory

public class JythonCacheEntryFactory
extends Object
implements net.sf.ehcache.constructs.blocking.CacheEntryFactory

Factory class for instantiating jython scripts to be cached.

Author:
Oliver Lucido

Constructor Summary
JythonCacheEntryFactory(PortalManager portalManager, VelocityService velocityService, ScriptingServices scriptingServices)
          Constructs the factory.
 
Method Summary
 Object createEntry(Object key)
          Creates a jython object instance for the script cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JythonCacheEntryFactory

public JythonCacheEntryFactory(PortalManager portalManager,
                               VelocityService velocityService,
                               ScriptingServices scriptingServices)
Constructs the factory.

Parameters:
portalManager - a PortalManager instance
velocityService - a VelocityService instance
scriptingServices - a ScriptingServices instance
Method Detail

createEntry

public Object createEntry(Object key)
                   throws Exception
Creates a jython object instance for the script cache.

Specified by:
createEntry in interface net.sf.ehcache.constructs.blocking.CacheEntryFactory
Parameters:
key - the path to the jython script
Returns:
an instantiated jython object
Throws:
Exception - if the jython object failed to be instantiated


Copyright © 2009-2014. All Rights Reserved.