001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.kernel.resiliency.spi;
016    
017    import com.liferay.portal.kernel.nio.intraband.RegistrationReference;
018    import com.liferay.portal.kernel.resiliency.mpi.MPI;
019    import com.liferay.portal.kernel.resiliency.spi.agent.SPIAgent;
020    
021    import java.io.Serializable;
022    
023    import java.rmi.Remote;
024    import java.rmi.RemoteException;
025    
026    /**
027     * @author Shuyang Zhou
028     */
029    public interface SPI extends Remote, Serializable {
030    
031            public static final String SPI_INSTANCE_PUBLICATION_KEY =
032                    "SPI_INSTANCE_PUBLICATION_KEY";
033    
034            public void addServlet(
035                            String contextPath, String docBasePath, String mappingPattern,
036                            String servletClassName)
037                    throws RemoteException;
038    
039            public void addWebapp(String contextPath, String docBasePath)
040                    throws RemoteException;
041    
042            public void destroy() throws RemoteException;
043    
044            public MPI getMPI() throws RemoteException;
045    
046            public RegistrationReference getRegistrationReference()
047                    throws RemoteException;
048    
049            public SPIAgent getSPIAgent() throws RemoteException;
050    
051            public SPIConfiguration getSPIConfiguration() throws RemoteException;
052    
053            public String getSPIProviderName() throws RemoteException;
054    
055            public void init() throws RemoteException;
056    
057            public boolean isAlive() throws RemoteException;
058    
059            public void start() throws RemoteException;
060    
061            public void stop() throws RemoteException;
062    
063    }