- /*
- * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- */
-
- package javax.resource.cci;
-
- import javax.resource.ResourceException;
-
- /**ResourceWarning provides information on warnings related to
- * execution of an interaction with an EIS. Warnings are silently
- * chained to the object whose method caused it to be reported.
- *
- * @see Interaction#getWarnings
- */
- public class ResourceWarning extends ResourceException {
-
- /**
- * Constructs a fully-specified <code>ResourceWarning</code> object
- * initialized with the given values.
- *
- * @param reason description of the warning
- * @param errorcode a string specifying the vendor specific
- * error code
- */
- public ResourceWarning(String reason, String errorCode) {
- super(reason, errorCode);
- }
-
- /**
- * Constructs an <code>ResourceWarning</code> object
- * with the given value for a reason; errorCode defaults to
- * null.
- *
- * @param reason description of the warning
- **/
- public ResourceWarning(String reason) {
- super(reason);
- }
-
-
- /**
- * Retrieves the warning chained to this <code>ResourceWarning</code>
- * object.
- *
- * @return next ResourceWarning in the chain; null if none
- */
- public ResourceWarning getLinkedWarning() {
- try {
- return ((ResourceWarning)getLinkedException());
- }
- catch (ClassCastException ex) {
- return null;
- }
- }
-
- /**
- * Adds an <code>ResourceWarning</code> object to the end of the chain.
- *
- * @param warning ResourceWarning added to the chain
- */
- public void setLinkedWarning(ResourceWarning warning) {
- setLinkedException(warning);
- }
-
- }