001/* 002 * Copyright 2002-2012 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.core; 018 019/** 020 * Interface to be implemented by transparent resource proxies that need to be 021 * considered as equal to the underlying resource, for example for consistent 022 * lookup key comparisons. Note that this interface does imply such special 023 * semantics and does not constitute a general-purpose mixin! 024 * 025 * <p>Such wrappers will automatically be unwrapped for key comparisons in 026 * {@link org.springframework.transaction.support.TransactionSynchronizationManager}. 027 * 028 * <p>Only fully transparent proxies, e.g. for redirection or service lookups, 029 * are supposed to implement this interface. Proxies that decorate the target 030 * object with new behavior, such as AOP proxies, do <i>not</i> qualify here! 031 * 032 * @author Juergen Hoeller 033 * @since 2.5.4 034 * @see org.springframework.transaction.support.TransactionSynchronizationManager 035 */ 036public interface InfrastructureProxy { 037 038 /** 039 * Return the underlying resource (never {@code null}). 040 */ 041 Object getWrappedObject(); 042 043}