Examples of EventContextImpl


Examples of org.apache.tuscany.core.context.impl.EventContextImpl

        scope.stop();
    }


    public void testInitDestroyOrderRequestScope() throws Exception {
        EventContext ctx = new EventContextImpl();
        RequestScopeContext scope = new RequestScopeContext(ctx);
        scope.registerFactories(MockContextFactory.createWiredContexts(Scope.REQUEST,scope));
        scope.start();
        Object request =  new Object();
        scope.onEvent(new RequestStart(this,request));
View Full Code Here

Examples of org.apache.tuscany.core.context.impl.EventContextImpl

    /**
     * Ensures scope events are propagated in an composite scope
     */
    public void testCompositeScopePropagation() throws Exception {
        EventContext ctx = new EventContextImpl();
        CompositeContext moduleComponentCtx = new CompositeContextImpl();
        moduleComponentCtx.setName("testMC");
        moduleComponentCtx.start();
        CompositeScopeContext scopeContainer = new CompositeScopeContext(ctx);
        scopeContainer.registerFactory(MockFactory.createCompositeConfiguration("CompositeComponent"));
View Full Code Here

Examples of org.apache.tuscany.core.context.impl.EventContextImpl

    /**
     * Ensures only child entry points (and not components) are accessible from parents
     */
    public void testCompositeNoEntryPoint() throws Exception {
        EventContext ctx = new EventContextImpl();
        CompositeContext moduleComponentCtx = new CompositeContextImpl();
        moduleComponentCtx.setName("testMC");
        CompositeScopeContext scopeContainer = new CompositeScopeContext(ctx);
        scopeContainer.registerFactory(MockFactory.createCompositeConfiguration("CompositeComponent"));
        scopeContainer.start();
View Full Code Here

Examples of org.apache.tuscany.core.context.impl.EventContextImpl

    /**
     * Tests adding a context before its parent has been started
     */
    public void testRegisterContextBeforeStart() throws Exception {
        EventContext ctx = new EventContextImpl();
        CompositeContext moduleComponentCtx = new CompositeContextImpl();
        moduleComponentCtx.setName("testMC");
        CompositeScopeContext scopeContainer = new CompositeScopeContext(ctx);
        scopeContainer.registerFactory(MockFactory.createCompositeConfiguration("CompositeComponent"));
        scopeContainer.start();
View Full Code Here

Examples of org.apache.tuscany.core.context.impl.EventContextImpl

    /**
     * Tests adding a context after its parent has been started
     */
    public void testRegisterContextAfterStart() throws Exception {
        EventContext ctx = new EventContextImpl();
        CompositeContext moduleComponentCtx = new CompositeContextImpl();
        moduleComponentCtx.setName("testMC");
        CompositeScopeContext scopeContainer = new CompositeScopeContext(ctx);
        scopeContainer.start();

View Full Code Here

Examples of org.rhq.core.pc.event.EventContextImpl

    @Nullable
    private EventContext getEventContext(Resource resource) {
        EventContext eventContext;
        if (resource.getResourceType().getEventDefinitions() != null
            && !resource.getResourceType().getEventDefinitions().isEmpty()) {
            eventContext = new EventContextImpl(resource, eventManager);
        } else {
            eventContext = null;
        }
        return eventContext;
    }
View Full Code Here

Examples of org.rhq.core.pc.event.EventContextImpl

        ResourceDiscoveryComponent resourceDiscoveryComponent = new NothingDiscoveringDiscoveryComponent();
        SystemInfo systemInfo = SystemInfoFactory.createSystemInfo();
        File temporaryDirectory = temp;
        File dataDirectory = temp;
        String pluginContainerName = "rhq";
        EventContext eventContext = new EventContextImpl(resource, eventManager);
        OperationContext operationContext = new OperationContextImpl(0);
        ContentContext contentContext = new ContentContextImpl(0);
        PluginContainerDeployment pluginContainerDeployment = null;
        AvailabilityContext availContext = new AvailabilityContextImpl(resource, pluginContainer.getInventoryManager());
        InventoryContext inventoryContext = new InventoryContextImpl(resource, pluginContainer.getInventoryManager());
View Full Code Here

Examples of org.rhq.core.pc.event.EventContextImpl

        ResourceComponent component = (ResourceComponent) Class.forName(rclassname).newInstance();

        availabilityContext = new AvailabilityContextImpl(cresource, pluginContainer.getInventoryManager());
        inventoryContext = new InventoryContextImpl(cresource, pluginContainer.getInventoryManager());

        EventContext eventContext = new EventContextImpl(resource, eventManager);
        ResourceContext context = new ResourceContext(cresource, parentComponent,
                null, rdc, systemInfo, temporaryDirectory, dataDirectory,
                pluginContainerName, eventContext, operationContext, contentContext,
                availabilityContext, inventoryContext, pluginContainerDeployment);
View Full Code Here

Examples of org.rhq.core.pc.event.EventContextImpl

        ResourceComponent component = (ResourceComponent) Class.forName(rclassname).newInstance();

        AvailabilityContext availContext = new AvailabilityContextImpl(cresource, pluginContainer.getInventoryManager());
        InventoryContext inventoryContext = new InventoryContextImpl(cresource, pluginContainer.getInventoryManager());

        EventContext eventContext = new EventContextImpl(resource, eventManager);
        ResourceContext context = new ResourceContext(cresource, parentComponent,
                null, rdc, systemInfo, temporaryDirectory, dataDirectory,
                pluginContainerName, eventContext, operationContext, contentContext,
                availContext, inventoryContext,pluginContainerDeployment);
View Full Code Here

Examples of org.rhq.core.pc.event.EventContextImpl

            components.put(component, resource);
            resource.setParentResource(pluginContainer.getInventoryManager().getPlatform());

            ResourceDiscoveryComponent resourceDiscoveryComponent = new NothingDiscoveringDiscoveryComponent();
            EventContext eventContext = new EventContextImpl(resource, eventManager);
            AvailabilityContext availContext = new AvailabilityContextImpl(resource, pluginContainer.getInventoryManager());
            InventoryContext inventoryContext = new InventoryContextImpl(resource, pluginContainer.getInventoryManager());
            ResourceContext context = new ResourceContext(resource, parentResourceComponent, parentResourceContext,
                resourceDiscoveryComponent, systemInfo, temporaryDirectory, dataDirectory, pluginContainerName,
                eventContext, operationContext, contentContext, availContext, inventoryContext,
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.