Examples of canInvoke()


Examples of com.et.mvc.filter.Filter.canInvoke()

    List<Filter> chains = FilterUtils.getFilterChain(controller);
    boolean chainBroken = false;
    try {
      for (int i = 0; i < chains.size(); i++) {
        Filter filter = chains.get(i);
        if (filter.canInvoke(controller.getActionName())) {
          boolean ret = filter.beforeInvoke(controller);
          if (ret == true && filter.getAroundFilter() != null) {
            arounds.add(filter);
          }
          if (!ret) {
View Full Code Here

Examples of com.et.mvc.filter.Filter.canInvoke()

    }

    // After过滤器,顺序执行
    for (int i = 0; i < chains.size(); i++) {
      Filter filter = chains.get(i);
      if (filter.canInvoke(controller.getActionName())
          && filter.getAfterFilter() != null) {
        boolean ret = filter.afterInvoke(controller);
        if (!ret) {
          return;
        }
View Full Code Here

Examples of org.apache.karaf.management.KarafMBeanServerGuard.canInvoke()

            MBeanServer mbs = EasyMock.createMock(MBeanServer.class);
            EasyMock.replay(mbs);

            String objectName = "foo.bar.testing:type=SomeMBean";
            KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName))).andReturn(true);
            EasyMock.replay(testGuard);
            KarafMBeanServerBuilder.setGuard(testGuard);

            JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
            mb.setMBeanServer(mbs);
View Full Code Here

Examples of org.apache.karaf.management.KarafMBeanServerGuard.canInvoke()

            MBeanServer mbs = EasyMock.createMock(MBeanServer.class);
            EasyMock.replay(mbs);

            String objectName = "foo.bar.testing:type=SomeMBean";
            KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName))).andReturn(false);
            EasyMock.replay(testGuard);
            KarafMBeanServerBuilder.setGuard(testGuard);

            JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
            mb.setMBeanServer(mbs);
View Full Code Here

Examples of org.apache.karaf.management.KarafMBeanServerGuard.canInvoke()

            MBeanServer mbs = EasyMock.createMock(MBeanServer.class);
            EasyMock.replay(mbs);

            String objectName = "foo.bar.testing:type=SomeMBean";
            KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName))).andThrow(new IOException());
            EasyMock.replay(testGuard);
            KarafMBeanServerBuilder.setGuard(testGuard);

            JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
            mb.setMBeanServer(mbs);
View Full Code Here

Examples of org.apache.karaf.management.KarafMBeanServerGuard.canInvoke()

            String objectName = "foo.bar.testing:type=SomeMBean";
            KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
            String[] la = new String[]{"long"};
            String[] sa = new String[]{"java.lang.String"};
            String[] sa2 = new String[]{"java.lang.String", "java.lang.String"};
            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "testMethod", la)).andReturn(true);
            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "testMethod", sa)).andReturn(true);
            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "otherMethod", sa2)).andReturn(false);
            EasyMock.replay(testGuard);
            KarafMBeanServerBuilder.setGuard(testGuard);
View Full Code Here

Examples of org.apache.karaf.management.KarafMBeanServerGuard.canInvoke()

            KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
            String[] la = new String[]{"long"};
            String[] sa = new String[]{"java.lang.String"};
            String[] sa2 = new String[]{"java.lang.String", "java.lang.String"};
            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "testMethod", la)).andReturn(true);
            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "testMethod", sa)).andReturn(true);
            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "otherMethod", sa2)).andReturn(false);
            EasyMock.replay(testGuard);
            KarafMBeanServerBuilder.setGuard(testGuard);

            JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
View Full Code Here

Examples of org.apache.karaf.management.KarafMBeanServerGuard.canInvoke()

            String[] la = new String[]{"long"};
            String[] sa = new String[]{"java.lang.String"};
            String[] sa2 = new String[]{"java.lang.String", "java.lang.String"};
            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "testMethod", la)).andReturn(true);
            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "testMethod", sa)).andReturn(true);
            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "otherMethod", sa2)).andReturn(false);
            EasyMock.replay(testGuard);
            KarafMBeanServerBuilder.setGuard(testGuard);

            JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
            mb.setMBeanServer(mbs);
View Full Code Here

Examples of org.apache.karaf.management.KarafMBeanServerGuard.canInvoke()

            EasyMock.replay(mbs);

            String objectName = "foo.bar.testing:type=SomeMBean";
            KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
            String[] ea = new String[]{};
            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "testMethod", ea)).andThrow(new IOException());
            EasyMock.replay(testGuard);
            KarafMBeanServerBuilder.setGuard(testGuard);

            JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
            mb.setMBeanServer(mbs);
View Full Code Here

Examples of org.apache.karaf.management.KarafMBeanServerGuard.canInvoke()

            KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
            String objectName = "foo.bar.testing:type=SomeMBean";
            final String[] la = new String[]{"long"};
            final String[] sa = new String[]{"java.lang.String"};
            EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName)), EasyMock.eq("testMethod"), EasyMock.aryEq(la))).andReturn(true).anyTimes();
            EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName)), EasyMock.eq("testMethod"), EasyMock.aryEq(sa))).andReturn(false).anyTimes();
            EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName)), EasyMock.eq("otherMethod"))).andReturn(true).anyTimes();
            String objectName2 = "foo.bar.testing:type=SomeOtherMBean";
            EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName2)))).andReturn(true).anyTimes();
            String objectName3 = "foo.bar.foo.testing:type=SomeOtherMBean";
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.