| 1 | /* Copyright (C) 2001 Free Software Foundation
|
|---|
| 2 |
|
|---|
| 3 | This file is part of libgcj.
|
|---|
| 4 |
|
|---|
| 5 | This software is copyrighted work licensed under the terms of the
|
|---|
| 6 | Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
|---|
| 7 | details. */
|
|---|
| 8 |
|
|---|
| 9 | package javax.naming;
|
|---|
| 10 |
|
|---|
| 11 | import java.lang.Exception;
|
|---|
| 12 |
|
|---|
| 13 | /**
|
|---|
| 14 | * @author Warren Levy <[email protected]>
|
|---|
| 15 | * @date June 14, 2001
|
|---|
| 16 | */
|
|---|
| 17 |
|
|---|
| 18 | public class LinkException extends NamingException
|
|---|
| 19 | {
|
|---|
| 20 | // Serialized fields.
|
|---|
| 21 | protected Name linkResolvedName;
|
|---|
| 22 | protected Object linkResolvedObj;
|
|---|
| 23 | protected Name linkRemainingName;
|
|---|
| 24 | protected String linkExplanation;
|
|---|
| 25 |
|
|---|
| 26 | public LinkException ()
|
|---|
| 27 | {
|
|---|
| 28 | super ();
|
|---|
| 29 | }
|
|---|
| 30 |
|
|---|
| 31 | public LinkException (String msg)
|
|---|
| 32 | {
|
|---|
| 33 | super (msg);
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | public Name getLinkResolvedName()
|
|---|
| 37 | {
|
|---|
| 38 | return linkResolvedName;
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | public Name getLinkRemainingName()
|
|---|
| 42 | {
|
|---|
| 43 | return linkRemainingName;
|
|---|
| 44 | }
|
|---|
| 45 |
|
|---|
| 46 | public Object getLinkResolvedObj()
|
|---|
| 47 | {
|
|---|
| 48 | return linkResolvedObj;
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 | public String getLinkExplanation()
|
|---|
| 52 | {
|
|---|
| 53 | return linkExplanation;
|
|---|
| 54 | }
|
|---|
| 55 |
|
|---|
| 56 | public void setLinkExplanation(String msg)
|
|---|
| 57 | {
|
|---|
| 58 | linkExplanation = msg;
|
|---|
| 59 | }
|
|---|
| 60 |
|
|---|
| 61 | public void setLinkResolvedName(Name name)
|
|---|
| 62 | {
|
|---|
| 63 | linkResolvedName = (Name) name.clone();
|
|---|
| 64 | }
|
|---|
| 65 |
|
|---|
| 66 | public void setLinkRemainingName(Name name)
|
|---|
| 67 | {
|
|---|
| 68 | linkRemainingName = (Name) name.clone();
|
|---|
| 69 | }
|
|---|
| 70 |
|
|---|
| 71 | public void setLinkResolvedObj(Object obj)
|
|---|
| 72 | {
|
|---|
| 73 | linkResolvedObj = obj;
|
|---|
| 74 | }
|
|---|
| 75 |
|
|---|
| 76 | public String toString ()
|
|---|
| 77 | {
|
|---|
| 78 | return super.toString () + "; " + linkRemainingName.toString ();
|
|---|
| 79 | }
|
|---|
| 80 |
|
|---|
| 81 | public String toString (boolean detail)
|
|---|
| 82 | {
|
|---|
| 83 | String r = super.toString (detail) + "; " + linkRemainingName.toString ();
|
|---|
| 84 | if (detail)
|
|---|
| 85 | r += "; " + linkResolvedObj.toString ();
|
|---|
| 86 | return r;
|
|---|
| 87 | }
|
|---|
| 88 | }
|
|---|