this.csf = csf;
this.ssf = ssf;
}
ListenEndpoint create() {
ServerEndpoint serverEndpoint;
try {
serverEndpoint = KerberosServerEndpoint.getInstance(
serverSubject, serverPrincipal, serverHost, port,
csf, ssf);
} catch (Exception e) {
throw new RuntimeException(
"failed to get server endpoint instance", e);
}
class LC implements ListenContext {
ListenEndpoint listenEndpoint;
public ListenCookie addListenEndpoint(
ListenEndpoint listenEndpoint)
throws IOException
{
this.listenEndpoint = listenEndpoint;
throw new IOException();
}
}
LC lc = new LC();
try {
serverEndpoint.enumerateListenEndpoints(lc);
} catch (IOException e) {
}
return lc.listenEndpoint;
}