01: /*
02: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
03: *
04: * This code is free software; you can redistribute it and/or modify it
05: * under the terms of the GNU General Public License version 2 only, as
06: * published by the Free Software Foundation. Sun designates this
07: * particular file as subject to the "Classpath" exception as provided
08: * by Sun in the LICENSE file that accompanied this code.
09: *
10: * This code is distributed in the hope that it will be useful, but WITHOUT
11: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13: * version 2 for more details (a copy is included in the LICENSE file that
14: * accompanied this code).
15: *
16: * You should have received a copy of the GNU General Public License version
17: * 2 along with this work; if not, write to the Free Software Foundation,
18: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19: *
20: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
21: * CA 95054 USA or visit www.sun.com if you need additional information or
22: * have any questions.
23: */
24:
25: /*
26: * @(#)ServiceName.java 1.17 07/04/27
27: *
28: * (C) Copyright IBM Corp. 1999 All Rights Reserved.
29: * Copyright 1997 The Open Group Research Institute. All rights reserved.
30: */
31:
32: package sun.security.krb5;
33:
34: import java.net.InetAddress;
35: import java.net.UnknownHostException;
36:
37: public class ServiceName extends PrincipalName {
38:
39: public ServiceName(String name, int type) throws RealmException {
40: super (name, type);
41:
42: }
43:
44: public ServiceName(String name) throws RealmException {
45: this (name, PrincipalName.KRB_NT_UNKNOWN);
46: }
47:
48: public ServiceName(String name, String realm) throws RealmException {
49: this (name, PrincipalName.KRB_NT_UNKNOWN);
50: setRealm(realm);
51: }
52:
53: public ServiceName(String service, String instance, String realm)
54: throws KrbException {
55: super(service, instance, realm, PrincipalName.KRB_NT_SRV_INST);
56: }
57:
58: }
|