Examples of RollerTask


Examples of org.apache.roller.business.runnable.RollerTask

    public void testTaskLockCRUD() throws Exception {
       
        ThreadManager mgr = RollerFactory.getRoller().getThreadManager();
       
        // need a test task to play with
        RollerTask task = new TestTask();
       
        // try to acquire a lock
        boolean lockAcquired = mgr.acquireLock(task);
        assertTrue(lockAcquired);
        TestUtils.endSession(true);
View Full Code Here

Examples of org.apache.roller.business.runnable.RollerTask

            if(taskClassName != null) {
                mLogger.info("Initializing task: "+tasks[i]);
               
                try {
                    Class taskClass = Class.forName(taskClassName);
                    RollerTask task = (RollerTask) taskClass.newInstance();
                    task.init();
                   
                    Date startTime = task.getStartTime(now);
                    if(startTime == null || now.after(startTime)) {
                        startTime = now;
                    }
                   
                    // schedule it
                    tmgr.scheduleFixedRateTimerTask(task, startTime, task.getInterval());
                   
                } catch (ClassCastException ex) {
                    mLogger.warn("Task does not extend RollerTask class", ex);
                } catch (RollerException ex) {
                    mLogger.error("Error scheduling task", ex);
View Full Code Here

Examples of org.apache.roller.weblogger.business.runnable.RollerTask

    public void testTaskLockCRUD() throws Exception {
       
        ThreadManager mgr = WebloggerFactory.getWeblogger().getThreadManager();
       
        // need a test task to play with
        RollerTask task = new TestTask();
       
        // try to acquire a lock
        assertTrue(mgr.registerLease(task));
        TestUtils.endSession(true);
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.