/** * Get the KDC Tcp port, if it has been set. */ public int getKdcTcpPort() { KOption option = startupOptions.getOption(KdcServerOption.KDC_TCP_PORT); if (option != null) { return (Integer) option.getOptionInfo().getValue(); } return 0; }
public void add(KOption option, Object optionValue) { if (option != null) { option.getOptionInfo().setValue(optionValue); add(option); } }
/** * Set KDC realm for ticket request * @param realm The realm */ public void setKdcRealm(String realm) { commonOptions.add(KrbOption.KDC_REALM, realm); }
public Object getOptionValue(KOption option) { if (!contains(option)) { return null; } return options.get(option).getOptionInfo().getValue(); }
public File getFileOption(KOption option) { Object value = getOptionValue(option); if (value instanceof File) { return (File) value; } return null; }
public int getTimeout() { int timeout = commonOptions.getIntegerOption(KrbOption.CONN_TIMEOUT); if (timeout > 0) { return timeout; } return 1000; // by default } }
/** * Set to allow TCP or not. * @param allowTcp true if allow tcp */ public void setAllowTcp(boolean allowTcp) { commonOptions.add(KrbOption.ALLOW_TCP, allowTcp); }
/** * Get the KDC udp port, if it has been set. */ public int getKdcUdpPort() { KOption option = startupOptions.getOption(KdcServerOption.KDC_UDP_PORT); if (option != null) { return (Integer) option.getOptionInfo().getValue(); } return 0; }
public void add(KOption option, Object optionValue) { if (option != null) { option.getOptionInfo().setValue(optionValue); add(option); } }
/** * Set to allow UDP or not. * @param allowUdp true if allow udp */ public void setAllowUdp(boolean allowUdp) { startupOptions.add(KdcServerOption.ALLOW_UDP, allowUdp); }
/** * Get the KDC port, if it has been set. */ public int getKdcPort() { KOption option = startupOptions.getOption(KdcServerOption.KDC_PORT); if (option != null) { return (Integer) option.getOptionInfo().getValue(); } return 0; }
/** * Allow to hook customized kdc implementation. * * @param innerKdcImpl The inner kdc implementation */ public void setInnerKdcImpl(InternalKdcServer innerKdcImpl) { startupOptions.add(KdcServerOption.INNER_KDC_IMPL, innerKdcImpl); }
/** * Get the KDC udp port, if it has been set. */ public int getKdcUdpPort() { KOption option = startupOptions.getOption(KdcServerOption.KDC_UDP_PORT); if (option != null) { return (Integer) option.getOptionInfo().getValue(); } return 0; }
/** * Set to allow UDP or not. * @param allowUdp true if allow udp */ public void setAllowUdp(boolean allowUdp) { commonOptions.add(AdminOption.ALLOW_UDP, allowUdp); }
/** * Get the KDC port, if it has been set. */ public int getKdcPort() { KOption option = startupOptions.getOption(KdcServerOption.KDC_PORT); if (option != null) { return (Integer) option.getOptionInfo().getValue(); } return 0; }
/** * Set to allow TCP or not. * @param allowTcp true if allow tcp */ public void setAllowTcp(boolean allowTcp) { commonOptions.add(AdminOption.ALLOW_TCP, allowTcp); }
/** * Get the KDC Tcp port, if it has been set. */ public int getKdcTcpPort() { KOption option = startupOptions.getOption(KdcServerOption.KDC_TCP_PORT); if (option != null) { return (Integer) option.getOptionInfo().getValue(); } return 0; }
/** * Set time out for connection * @param timeout in seconds */ public void setTimeout(int timeout) { commonOptions.add(AdminOption.CONN_TIMEOUT, timeout); }
/** * Set time out for connection * @param timeout in seconds */ public void setTimeout(int timeout) { commonOptions.add(KrbOption.CONN_TIMEOUT, timeout); }
/** * Set runtime folder. * @param workDir The work dir */ public void setWorkDir(File workDir) { startupOptions.add(KdcServerOption.WORK_DIR, workDir); }