Examples of workStarted()


Examples of commonj.work.WorkListener.workStarted()

    private void workStarted(final WorkItemImpl workItem, final Work work) {
        WorkListener listener = workItems.get(workItem);
        if (listener != null) {
            workItem.setStatus(WorkEvent.WORK_STARTED);
            WorkEvent event = new WorkEventImpl(workItem);
            listener.workStarted(event);
        }
    }

    /*
     * Method to indicate a work completion.
View Full Code Here

Examples of commonj.work.WorkListener.workStarted()

    private void workStarted(final WorkItemImpl workItem, final Work work) {
        WorkListener listener = workItems.get(workItem);
        if (listener != null) {
            workItem.setStatus(WorkEvent.WORK_STARTED);
            WorkEvent event = new WorkEventImpl(workItem);
            listener.workStarted(event);
        }
    }

    /*
     * Method to indicate a work completion.
View Full Code Here

Examples of commonj.work.WorkListener.workStarted()

    private void workStarted(final WorkItemImpl workItem, final Work work) {
        WorkListener listener = workItems.get(workItem);
        if (listener != null) {
            workItem.setStatus(WorkEvent.WORK_STARTED);
            WorkEvent event = new WorkEventImpl(workItem);
            listener.workStarted(event);
        }
    }

    /*
     * Method to indicate a work completion.
View Full Code Here

Examples of commonj.work.WorkListener.workStarted()

    private void workStarted(final WorkItemImpl workItem, final Work work) {
        WorkListener listener = workItems.get(workItem);
        if (listener != null) {
            workItem.setStatus(WorkEvent.WORK_STARTED);
            WorkEvent event = new WorkEventImpl(workItem);
            listener.workStarted(event);
        }
    }

    /*
     * Method to indicate a work completion.
View Full Code Here

Examples of commonj.work.WorkListener.workStarted()

    private void workStarted(final DefaultWorkItem workItem, final Work work) {
        WorkListener listener = workItems.get(workItem);
        if (listener != null) {
            workItem.setStatus(WorkEvent.WORK_STARTED);
            WorkEvent event = new DefaultWorkEvent(workItem);
            listener.workStarted(event);
        }
    }

    /*
     * Method to indicate a work completion.
View Full Code Here

Examples of commonj.work.WorkListener.workStarted()

    public void testListener() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        WorkListener listener = createStrictMock(WorkListener.class);
        listener.workAccepted(isA(WorkEvent.class));
        listener.workStarted(isA(WorkEvent.class));
        listener.workCompleted(isA(WorkEvent.class));
        expectLastCall();
        replay(listener);
        Work work = createMock(Work.class);
        work.run();
View Full Code Here

Examples of commonj.work.WorkListener.workStarted()

    public void testDelayListener() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        final CountDownLatch latch2 = new CountDownLatch(1);
        WorkListener listener = createStrictMock(WorkListener.class);
        listener.workAccepted(isA(WorkEvent.class));
        listener.workStarted(isA(WorkEvent.class));
        listener.workCompleted(isA(WorkEvent.class));
        expectLastCall().andStubAnswer(new IAnswer<Object>() {
            public Object answer() throws Throwable {
                latch2.countDown();
                return null;
View Full Code Here

Examples of commonj.work.WorkListener.workStarted()

    public void testErrorListener() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        WorkListener listener = createStrictMock(WorkListener.class);
        listener.workAccepted(isA(WorkEvent.class));
        listener.workStarted(isA(WorkEvent.class));
        listener.workCompleted(isA(WorkEvent.class));
        replay(listener);
        Work work = createMock(Work.class);
        work.run();
        expectLastCall().andStubAnswer(new IAnswer<Object>() {
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.