001/** 002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 003 * 004 * Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved 005 * 006 * The contents of this file are subject to the terms 007 * of the Common Development and Distribution License 008 * (the License). You may not use this file except in 009 * compliance with the License. 010 * 011 * You can obtain a copy of the License at 012 * https://opensso.dev.java.net/public/CDDLv1.0.html or 013 * opensso/legal/CDDLv1.0.txt 014 * See the License for the specific language governing 015 * permission and limitations under the License. 016 * 017 * When distributing Covered Code, include this CDDL 018 * Header Notice in each file and include the License file 019 * at opensso/legal/CDDLv1.0.txt. 020 * If applicable, add the following below the CDDL Header, 021 * with the fields enclosed by brackets [] replaced by 022 * your own identifying information: 023 * "Portions Copyrighted [year] [name of copyright owner]" 024 * 025 * $Id: InteractionException.java,v 1.2 2008/06/25 05:47:17 qcheng Exp $ 026 * 027 */ 028 029package com.sun.identity.liberty.ws.interaction; 030 031import com.sun.identity.shared.locale.L10NMessageImpl; 032 033/** 034 * Base class for exceptions that could be thrown from 035 * <code>InteractionService</code> framework. 036 * 037 * @supported.all.api 038 */ 039public class InteractionException extends L10NMessageImpl { 040 041 /** 042 * Constructor 043 * @param message message for the exception 044 */ 045 public InteractionException(String message) { 046 super(message); 047 } 048 049 /** 050 * Constructor 051 * @param nestedException <code>Throwable</code> nested in this exception. 052 */ 053 public InteractionException(Throwable nestedException) { 054 super(nestedException); 055 } 056 057 /** 058 * Constructor 059 * Constructs an instance of <code> InteractionException </code> to 060 * pass the localized error message 061 * 062 * At this level, the locale of the caller is not known and it is 063 * not possible to throw localized error message. 064 * Instead this constructor provides Resource Bundle name and error code 065 * for correctly locating the error message. The default 066 * <code>getMessage()</code> will always return English messages only. This 067 * is consistent with current JRE. 068 * 069 * @param rbName Resource Bundle Name to be used for getting 070 * localized error message. 071 * 072 * @param errorCode Key to resource bundle. You can use 073 * <pre> 074 * ResourceBundle rb = ResourceBunde.getBundle (rbName,locale); 075 * String localizedStr = rb.getString(errorCode); 076 * </pre> 077 * 078 * @param args arguments to message. If it is not present pass them 079 * as null 080 */ 081 public InteractionException(String rbName, String errorCode, 082 Object[] args) { 083 super(rbName, errorCode, args); 084 } 085 086}