@Test public void testForAD() { Assert.assertEquals(MITKerberosOperationHandler.class, injector.getInstance(KerberosOperationHandlerFactory.class).getKerberosOperationHandler(KDCType.MIT_KDC).getClass()); }
public KerberosOperationHandler getKerberosOperationHandler(KDCType kdcType) { if (kdcType == null) { throw new IllegalArgumentException("kdcType may not be null"); } switch (kdcType) { case MIT_KDC: return injector.getInstance(MITKerberosOperationHandler.class); case ACTIVE_DIRECTORY: return injector.getInstance(ADKerberosOperationHandler.class); case IPA: return injector.getInstance(IPAKerberosOperationHandler.class); default: throw new IllegalArgumentException(String.format("Unexpected kdcType value: %s", kdcType.name())); } }
KerberosOperationHandlerFactory { public KerberosOperationHandler getKerberosOperationHandler(KDCType kdcType) { if (kdcType == null) { throw new IllegalArgumentException("kdcType may not be null"); } switch (kdcType) { case MIT_KDC: return injector.getInstance(MITKerberosOperationHandler.class); case ACTIVE_DIRECTORY: return injector.getInstance(ADKerberosOperationHandler.class); case IPA: return injector.getInstance(IPAKerberosOperationHandler.class); default: throw new IllegalArgumentException(String.format("Unexpected kdcType value: %s", kdcType.name())); } } }
KerberosOperationHandlerFactory { public KerberosOperationHandler getKerberosOperationHandler(KDCType kdcType) { if (kdcType == null) { throw new IllegalArgumentException("kdcType may not be null"); } switch (kdcType) { case MIT_KDC: return injector.getInstance(MITKerberosOperationHandler.class); case ACTIVE_DIRECTORY: return injector.getInstance(ADKerberosOperationHandler.class); case IPA: return injector.getInstance(IPAKerberosOperationHandler.class); default: throw new IllegalArgumentException(String.format("Unexpected kdcType value: %s", kdcType.name())); } }  }
KerberosOperationHandlerFactory { public KerberosOperationHandler getKerberosOperationHandler(KDCType kdcType) { if (kdcType == null) { throw new IllegalArgumentException("kdcType may not be null"); } switch (kdcType) { case MIT_KDC: return injector.getInstance(MITKerberosOperationHandler.class); case ACTIVE_DIRECTORY: return injector.getInstance(ADKerberosOperationHandler.class); case IPA: return injector.getInstance(IPAKerberosOperationHandler.class); default: throw new IllegalArgumentException(String.format("Unexpected kdcType value: %s", kdcType.name())); } }  KerberosOperationHandler getKerberosOperationHandler(KDCType kdcType); }
KerberosOperationHandlerFactory { public KerberosOperationHandler getKerberosOperationHandler(KDCType kdcType) { if (kdcType == null) { throw new IllegalArgumentException("kdcType may not be null"); } switch (kdcType) { case MIT_KDC: return injector.getInstance(MITKerberosOperationHandler.class); case ACTIVE_DIRECTORY: return injector.getInstance(ADKerberosOperationHandler.class); case IPA: return injector.getInstance(IPAKerberosOperationHandler.class); default: throw new IllegalArgumentException(String.format("Unexpected kdcType value: %s", kdcType.name())); } }  KerberosOperationHandler getKerberosOperationHandler(KDCType kdcType);  }