Package org.apache.tuscany.sca.work

Examples of org.apache.tuscany.sca.work.WorkScheduler


        ServletHostExtensionPoint servletHosts =
            extensionPointRegistry.getExtensionPoint(ServletHostExtensionPoint.class);
       
        if (servletHosts.getServletHosts().size() < 1) {
            UtilityExtensionPoint utilities = extensionPointRegistry.getExtensionPoint(UtilityExtensionPoint.class);
            final WorkScheduler workScheduler = utilities.getUtility(WorkScheduler.class);
            // Allow privileged access to start MBeans. Requires MBeanPermission in security policy.
            server = AccessController.doPrivileged(new PrivilegedAction<TomcatServer>() {
                public TomcatServer run() {
                    return new TomcatServer(workScheduler);
                 }
View Full Code Here


* @version $Rev: 576235 $ $Date: 2007-09-16 19:07:54 -0700 (Sun, 16 Sep 2007) $
*/
public class NonBlockingInterceptorTestCase 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

    public void start(ExtensionPointRegistry extensionPointRegistry) {

        // Register a Jetty servlet host
        ServletHostExtensionPoint servletHosts =
            extensionPointRegistry.getExtensionPoint(ServletHostExtensionPoint.class);
        WorkScheduler workScheduler = extensionPointRegistry.getExtensionPoint(WorkScheduler.class);
        server = new JettyServer(workScheduler);
        servletHosts.addServletHost(server);
        server.init();
    }
View Full Code Here

* @version $Rev: 647737 $ $Date: 2008-04-14 04:41:35 -0700 (Mon, 14 Apr 2008) $
*/
public class NonBlockingInterceptorTestCase 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

        ServletHostExtensionPoint servletHosts =
            extensionPointRegistry.getExtensionPoint(ServletHostExtensionPoint.class);
       
        if (servletHosts.getServletHosts().size() < 1) {
            UtilityExtensionPoint utilities = extensionPointRegistry.getExtensionPoint(UtilityExtensionPoint.class);
            final WorkScheduler workScheduler = utilities.getUtility(WorkScheduler.class);
            // Allow privileged access to start MBeans. Requires MBeanPermission in security policy.
            try {
                server = AccessController.doPrivileged(new PrivilegedAction<JettyServer>() {
                    public JettyServer run() {
                        return new JettyServer(workScheduler);
View Full Code Here

    private JMSServiceListenerFactory jmsServiceListenerFactory;

    public JMSHostExtensionPointImpl(ExtensionPointRegistry extensionPoints) {
        UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
        WorkScheduler workScheduler = utilities.getUtility(WorkScheduler.class);
        this.jmsServiceListenerFactory = new JMSServiceListenerFactoryImpl(workScheduler);
    }
View Full Code Here

        ServletHost servletHost = servletHosts.getServletHosts().get(0);
        ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
        MessageFactory messageFactory = modelFactories.getFactory(MessageFactory.class);
        DataBindingExtensionPoint dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class);
        UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
        WorkScheduler workScheduler = utilities.getUtility(WorkScheduler.class);

        this.binding = binding.getSCABinding();
        wsBinding = modelFactories.getFactory(WebServiceBindingFactory.class).createWebServiceBinding();
        wsBinding.setName(this.binding.getName());        
        wsBinding.setURI(this.binding.getURI());
View Full Code Here

        throw new JMSBindingException("Unable to create JMSResponseInvoker", e);
      } // end try
       
        // Create the response queue handler
            UtilityExtensionPoint utilities = extensions.getExtensionPoint(UtilityExtensionPoint.class);
            WorkScheduler workScheduler = utilities.getUtility(WorkScheduler.class);
       
      responseQueue = new AsyncResponseJMSServiceListener(listener,
                    jmsBinding.getResponseDestinationName(),
                    jmsBinding, workScheduler, jmsResourceFactory);
      responseQueue.start();
View Full Code Here

        this.registry = registry;
        this.messageFactory = registry.getExtensionPoint(FactoryExtensionPoint.class).getFactory(MessageFactory.class);
        this.invocable = invocable;
       
        UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
        WorkScheduler scheduler = utilities.getUtility(WorkScheduler.class);
        theExecutor = scheduler.getExecutorService();
    }
View Full Code Here

    private JMSServiceListenerFactory jmsServiceListenerFactory;

    public DefaultJMSHostExtensionPoint(ExtensionPointRegistry extensionPoints) {
        UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
        WorkScheduler workScheduler = utilities.getUtility(WorkScheduler.class);
        this.jmsServiceListenerFactory = new DefaultJMSServiceListenerFactory(workScheduler);
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.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.