Package org.apache.tuscany.spi.services.work

Examples of org.apache.tuscany.spi.services.work.WorkScheduler


* @version $Rev: 451655 $ $Date: 2006-09-30 13:06:53 -0700 (Sat, 30 Sep 2006) $
*/
public class NonBlockingBridgingInterceptorTestCase extends TestCase {

    public void testInvoke() throws Exception {
        WorkScheduler scheduler = createMock(WorkScheduler.class);
        scheduler.scheduleWork(isA(Runnable.class));
        expectLastCall().andStubAnswer(new IAnswer<Object>() {
            public Object answer() throws Throwable {
                Runnable runnable = (Runnable) getCurrentArguments()[0];
                runnable.run();
                return null;
View Full Code Here


        expect(component.getTargetInstance()).andReturn(instance);
        EasyMock.replay(component);
        AsyncMonitor monitor = createMock(AsyncMonitor.class);
        replay(monitor);

        WorkScheduler scheduler = createMock(WorkScheduler.class);
        scheduler.scheduleWork(isA(Runnable.class));
        expectLastCall().andStubAnswer(new IAnswer() {
            public Object answer() throws Throwable {
                Runnable runnable = (Runnable) getCurrentArguments()[0];
                runnable.run();
                return null;
View Full Code Here

        AsyncTarget target = createMock(AsyncTarget.class);
        target.invoke();
        expectLastCall().once();
        replay(target);
        JavaAtomicComponent component = MockFactory.createJavaComponent(target);
        WorkScheduler scheduler = createMock(WorkScheduler.class);
        scheduler.scheduleWork(isA(Runnable.class));
        expectLastCall().andStubAnswer(new IAnswer<Object>() {
            public Object answer() throws Throwable {
                Runnable runnable = (Runnable) getCurrentArguments()[0];
                runnable.run();
                return null;
View Full Code Here

     */
    public void testScheduleWorkT() {


        WorkManager workManager = new ThreadPoolWorkManager(1);
        WorkScheduler workScheduler = new Jsr237WorkScheduler(workManager);

        workScheduler.scheduleWork(new MyRunnable(), new MyNotificationListener());

    }
View Full Code Here

        expectLastCall().once();
        replay(target);
        JavaAtomicComponent component = createJavaComponent(target);
        AsyncMonitor monitor = createMock(AsyncMonitor.class);
        replay(monitor);
        WorkScheduler scheduler = createMock(WorkScheduler.class);
        scheduler.scheduleWork(isA(Runnable.class));
        expectLastCall().andStubAnswer(new IAnswer<Object>() {
            public Object answer() throws Throwable {
                Runnable runnable = (Runnable) getCurrentArguments()[0];
                runnable.run();
                return null;
View Full Code Here

TOP

Related Classes of org.apache.tuscany.spi.services.work.WorkScheduler

Copyright © 2018 www.massapicom. 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.