Examples of IdentityImpl


Examples of com.sun.sgs.impl.auth.IdentityImpl

        if (logger.isLoggable(Level.CONFIG)) {
            logger.log(Level.CONFIG, "{0}: starting application", appName);
        }

        // start the service creation
        IdentityImpl owner = new SystemIdentity("app:" + appName);
        createServices(appName, owner);
        startApplication(appName, owner);
    }
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

            NodeMappingServerImpl nodeMappingServer =
                    (NodeMappingServerImpl) mapServer.get(nodeMappingService);
           
            // Create a new identity and assign it to a node
            // Since there is only 1 app node, it will be assigned to that one
            final Identity id = new IdentityImpl(appName + "_identity");
            nodeMappingService.assignNode(NodeMappingService.class, id);
            System.err.println("AppNode id: "+appNode.getNodeId());

            txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

    @Test
    public void testRunImmediateTasks() throws Exception {
        // test with application identity
        runImmediateTest(taskOwner);
        // test with un-mapped identity
        Identity newOwner = new IdentityImpl("id");
        runImmediateTest(newOwner);
        // test with mapped identity
        mappingService.assignNode(TestTaskServiceImpl.class,
                                  newOwner);
        runImmediateTest(newOwner);
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

    @Test
    public void testRunPendingTasks() throws Exception {
        // test with application identity
        runPendingTest(taskOwner);
        // test with un-mapped identity
        Identity newOwner = new IdentityImpl("id");
        runPendingTest(newOwner);
        // test with mapped identity
        mappingService.assignNode(TestTaskServiceImpl.class, newOwner);
        runPendingTest(newOwner);
    }
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

    @Test
    public void testRunPeriodicTasks() throws Exception {
        // test with application identity
        runPeriodicTest(taskOwner);
        // test with un-mapped identity
        Identity newOwner = new IdentityImpl("id");
        runPeriodicTest(newOwner);
        // test with mapped identity
        mappingService.assignNode(TestTaskServiceImpl.class, newOwner);
        runPeriodicTest(newOwner);
    }
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

            listenerClass.getConstructor(Properties.class,
                                         Identity.class,
                                         ComponentRegistry.class);

        // create a new identity for the listener
        IdentityImpl owner = new IdentityImpl(listenerClassName);

        // try to create and register the listener
        Object obj =
            listenerConstructor.newInstance(appProperties, owner,
                                            systemRegistry);
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

        systemRegistry, txnProxy);
            TestListener listener = new TestListener();       
            nodemap.addNodeMappingListener(listener);
           
            // We have NOT called ready yet.
            final Identity id = new IdentityImpl("first");
            nodemap.assignNode(NodeMappingService.class, id);
           
            txnScheduler.runTask(
                new TestAbstractKernelRunnable() {
                    public void run() throws Exception {
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

   
    /* -- Test assignNode -- */
    @Test
    public void testAssignNode() throws Exception {  
        // Assign outside a transaction
        final Identity id = new IdentityImpl("first");
        long nodeId =
                nodeMappingService.assignNode(NodeMappingService.class, id);

        if (nodeId < 0) {
            fail("Unexpected assignNode failure");
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

        }, taskOwner);
    }
   
    @Test(expected = NullPointerException.class)
    public void testAssignNodeNullServer() throws Exception {
        nodeMappingService.assignNode(null, new IdentityImpl("first"));
    }
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

        nodeMappingService.assignNode(NodeMappingService.class, null);
    }
   
    @Test
    public void testAssignNodeTwice() throws Exception {
        Identity id = new IdentityImpl("first");
        nodeMappingService.assignNode(NodeMappingService.class, id);
       
        // Now expect to be able to find the identity
        GetNodeTask task1 = new GetNodeTask(id);
        txnScheduler.runTask(task1, taskOwner);
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.