001    /*
002     * Copyright 2005 Stephen McConnell
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     *   http://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
013     * implied.
014     *
015     * See the License for the specific language governing permissions and
016     * limitations under the License.
017     */
018    
019    package net.dpml.transit.model;
020    
021    import java.net.URL;
022    import java.net.PasswordAuthentication; 
023    import java.rmi.Remote; 
024    import java.rmi.RemoteException; 
025    
026    /**
027     * The ProxyModel is an interface implemented by objects that
028     * manage the configuration of transit proxy settings.
029     *
030     * @author <a href="http://www.dpml.net">Digital Product Meta Library</a>
031     * @version 1.1.0
032     */
033    public interface ProxyModel extends Remote
034    {
035       /**
036        * Return the proxy host url.
037        *
038        * @return the proxy host (possibly null)
039        * @exception RemoteException if a remote exception occurs
040        */
041        public URL getHost() throws RemoteException;
042    
043       /**
044        * Return the proxy authentication or null if not defined.
045        * @return the proxy authentication credentials
046        * @exception RemoteException if a remote exception occurs
047        */
048        PasswordAuthentication getAuthentication() throws RemoteException;
049    
050       /**
051        * Return the proxy host request identifier.
052        * @return the request identifier for the proxy host or null if not defined.
053        * @exception RemoteException if a remote exception occurs
054        */
055        RequestIdentifier getRequestIdentifier() throws RemoteException;
056    
057       /**
058        * Return the set of excluded hosts as an array.
059        * @return the excluded host array
060        * @exception RemoteException if a remote exception occurs
061        */
062        String[] getExcludes() throws RemoteException;
063    
064       /**
065        * Add a proxy listener to the model.
066        * @param listener the listener to add
067        * @exception RemoteException if a remote exception occurs
068        */
069        void addProxyListener( ProxyListener listener ) throws RemoteException;
070    
071       /**
072        * Remove a proxy listener from the model.
073        * @param listener the listener to remove
074        * @exception RemoteException if a remote exception occurs
075        */
076        void removeProxyListener( ProxyListener listener ) throws RemoteException;
077       
078    }