Examples of IdentityImpl


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

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

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

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

        assertTrue(getNode <= proxy.getGetNodeCalls());
        assertTrue(setStatus <= proxy.getSetStatusCalls());
       
        // Test an API
        serverNode.getNodeMappingService().
                assignNode(NodeMappingService.class, new IdentityImpl("first"));
        assertTrue(assignNode < proxy.getAssignNodeCalls());
        assertTrue(assignNode < bean.getAssignNodeCalls());    
    }
View Full Code Here

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

    }

    /** Tests. */

    public void testMoveImmediateTask() throws Exception {
        IdentityImpl id = new IdentityImpl("fred");
        long expectedNode = additionalNodes[0].getNodeId();
        DummyNodeMappingService.assignIdentity(getClass(), id, expectedNode);
        txnSchedulerZero.runTask(
            new TestAbstractKernelRunnable() {
                public void run() {
View Full Code Here

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

        assertCounterClearXAction("An immediate task did not run");
        assertEquals(expectedNode, lastNodeUsed.get());
    }

    public void testMoveDelayedTask() throws Exception {
        IdentityImpl id = new IdentityImpl("fred");
        long expectedNode = additionalNodes[0].getNodeId();
        DummyNodeMappingService.assignIdentity(getClass(), id, expectedNode);
        txnSchedulerZero.runTask(
            new TestAbstractKernelRunnable() {
                public void run() {
View Full Code Here

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

        assertCounterClearXAction("A delayed task did not run");
        assertEquals(expectedNode, lastNodeUsed.get());
    }

    public void testMoveAfterScheduledDelayedTask() throws Exception {
        IdentityImpl id = new IdentityImpl("fred");
        DummyNodeMappingService.assignIdentity(getClass(), id,
                                               serverNode.getNodeId());
        txnSchedulerZero.runTask(
            new TestAbstractKernelRunnable() {
                public void run() {
View Full Code Here

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

        assertCounterClearXAction("A delayed task did not run");
        assertEquals(expectedNode, lastNodeUsed.get());
    }

    public void testMovePeriodicTask() throws Exception {
        IdentityImpl id = new IdentityImpl("fred");
        long expectedNode = serverNode.getNodeId();
        DummyNodeMappingService.assignIdentity(getClass(), id, expectedNode);
        txnSchedulerZero.runTask(
            new TestAbstractKernelRunnable() {
                public void run() {
View Full Code Here

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

        assertCounterClearXAction("Some periodic tasks did not run");
        assertEquals(expectedNode, lastNodeUsed.get());
    }

    public void testMoveAfterScheduledPeriodicTask() throws Exception {
        IdentityImpl id = new IdentityImpl("fred");
        DummyNodeMappingService.assignIdentity(getClass(), id,
                                               serverNode.getNodeId());
        txnSchedulerZero.runTask(
            new TestAbstractKernelRunnable() {
                public void run() {
View Full Code Here

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

        assertCounterClearXAction("A periodic task did not run");
        assertEquals(expectedNode, lastNodeUsed.get());
    }

    public void testCancelPeriodicHandle() throws Exception {
        IdentityImpl id = new IdentityImpl("fred");
        DummyNodeMappingService.assignIdentity(getClass(), id,
                                               serverNode.getNodeId());
        txnSchedulerZero.runTask(
            new TestAbstractKernelRunnable() {
                public void run() {
View Full Code Here

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

        Thread.sleep(500);
        assertCounterClearXAction("Unexpected run of a periodic task");
    }

    public void testActiveCountBasic() throws Exception {
        IdentityImpl id = new IdentityImpl("fred");
        assertEquals(DummyNodeMappingService.getActiveCount(id), 0);
        DummyNodeMappingService.assignIdentity(getClass(), id,
                                               serverNode.getNodeId());
        assertEquals(DummyNodeMappingService.getActiveCount(id), 1);
        txnSchedulerZero.runTask(
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.