001 /**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018 package org.apache.geronimo.connector.outbound.connectiontracking;
019
020 import org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor;
021 import org.apache.geronimo.connector.outbound.ConnectionInfo;
022
023 import java.util.HashMap;
024 import java.util.Map;
025 import java.util.Set;
026
027
028 /**
029 * Simple implementation of ComponentContext satisfying invariant.
030 *
031 * @version $Rev: 585608 $ $Date: 2007-10-17 13:56:54 -0400 (Wed, 17 Oct 2007) $
032 *
033 * */
034 public class ConnectorInstanceContextImpl implements ConnectorInstanceContext {
035 private final Map<ConnectionTrackingInterceptor, Set<ConnectionInfo>> connectionManagerMap = new HashMap<ConnectionTrackingInterceptor, Set<ConnectionInfo>>();
036 private final Set<String> unshareableResources;
037 private final Set<String> applicationManagedSecurityResources;
038
039 public ConnectorInstanceContextImpl(Set<String> unshareableResources, Set<String> applicationManagedSecurityResources) {
040 this.unshareableResources = unshareableResources;
041 this.applicationManagedSecurityResources = applicationManagedSecurityResources;
042 }
043
044 public Map<ConnectionTrackingInterceptor, Set<ConnectionInfo>> getConnectionManagerMap() {
045 return connectionManagerMap;
046 }
047
048 public Set<String> getUnshareableResources() {
049 return unshareableResources;
050 }
051
052 public Set<String> getApplicationManagedSecurityResources() {
053 return applicationManagedSecurityResources;
054 }
055 }