Lines Matching defs:port

88  * KDC kdc = KDC.create("REALM.NAME", port, isDaemon);
91 * Here, <code>port</code> is the UDP and TCP port number the KDC server
92 * listens on. If zero, a random port is chosen, which you can use getPort()
97 * The shortcut <code>KDC.create("REALM.NAME")</code> has port=0 and
116 * <li> <code>getPort</code>: Returns the port number the KDC uses
142 // Service port number
143 private int port;
201 * Creates and starts a KDC running as a daemon on a random port.
210 public static KDC existing(String realm, String kdc, int port) {
212 k.port = port;
219 * @param port the TCP and UDP port to listen to. A random port will to
225 public static KDC create(String realm, String kdc, int port, boolean asDaemon) throws IOException {
226 return new KDC(realm, kdc, port, asDaemon);
437 * Returns the service port of the KDC server.
438 * @return the KDC service port
441 return port;
458 protected KDC(String realm, String kdc, int port, boolean asDaemon)
461 startServer(port, asDaemon);
1113 * @return REALM.NAME = { kdc = host:port }
1119 kdc.port);
1124 * the same port number. It uses three threads to deal with requests.
1126 * @param port the port number to listen to. If zero, a random available
1127 * port no less than 8000 will be chosen and used.
1131 protected void startServer(int port, boolean asDaemon) throws IOException {
1132 if (port > 0) {
1133 u1 = new DatagramSocket(port, InetAddress.getByName("127.0.0.1"));
1134 t1 = new ServerSocket(port);
1137 // Try to find a port number that's both TCP and UDP free
1139 port = 8000 + new java.util.Random().nextInt(10000);
1141 u1 = new DatagramSocket(port, InetAddress.getByName("127.0.0.1"));
1142 t1 = new ServerSocket(port);
1151 System.out.println("Start KDC on " + port);
1153 this.port = port;