001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied. See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019
020
021 package javax.resource.spi.work;
022
023 import java.io.Serializable;
024 import java.util.HashMap;
025 import java.util.Map;
026
027 /**
028 * @version $Rev: 920245 $ $Date: 2010-03-08 04:25:34 -0500 (Mon, 08 Mar 2010) $
029 * @since 1.6
030 */
031 public class HintsContext implements WorkContext {
032
033 public static final String LONGRUNNING_HINT = "javax.resource.LongRunning";
034 public static final String NAME_HINT = "javax.resource.Name";
035
036 private static final long serialVersionUID=7956353628297167255L;
037
038 protected String description;
039
040 protected String name;
041
042 private final Map<String, Serializable> hints = new HashMap<String, Serializable>();
043
044 public String getDescription() {
045 return description;
046 }
047
048 public void setDescription(String description) {
049 this.description = description;
050 }
051
052 public String getName() {
053 return name;
054 }
055
056 public void setName(String name) {
057 this.name = name;
058 }
059
060 public Map<String, Serializable> getHints() {
061 return hints;
062 }
063
064 public void setHint(String name, Serializable hint) {
065 hints.put(name, hint);
066 }
067 }