001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.resiliency.spi.agent;
016    
017    import com.liferay.portal.kernel.nio.intraband.RegistrationReference;
018    import com.liferay.portal.kernel.resiliency.spi.SPI;
019    import com.liferay.portal.kernel.resiliency.spi.SPIConfiguration;
020    
021    import java.io.IOException;
022    
023    import javax.servlet.http.HttpServletRequest;
024    import javax.servlet.http.HttpServletResponse;
025    
026    /**
027     * @author Shuyang Zhou
028     */
029    public class MockSPIAgent implements SPIAgent {
030    
031            public MockSPIAgent(
032                    SPIConfiguration spiConfiguration,
033                    RegistrationReference registrationReference) {
034            }
035    
036            @Override
037            public void destroy() {
038                    throw new UnsupportedOperationException();
039            }
040    
041            @Override
042            public void init(SPI spi) {
043                    throw new UnsupportedOperationException();
044            }
045    
046            @Override
047            @SuppressWarnings("unused")
048            public HttpServletRequest prepareRequest(HttpServletRequest request)
049                    throws IOException {
050    
051                    throw new UnsupportedOperationException();
052            }
053    
054            @Override
055            public HttpServletResponse prepareResponse(
056                    HttpServletRequest request, HttpServletResponse response) {
057    
058                    throw new UnsupportedOperationException();
059            }
060    
061            @Override
062            public void service(
063                    HttpServletRequest request, HttpServletResponse response) {
064    
065                    throw new UnsupportedOperationException();
066            }
067    
068            @Override
069            public void transferResponse(
070                    HttpServletRequest request, HttpServletResponse response, Exception e) {
071    
072                    throw new UnsupportedOperationException();
073            }
074    
075    }