001    /*
002     * File:    $HeadURL:https://svn.sourceforge.net/svnroot/jvoicexml/trunk/src/org/jvoicexml/RemoteClient.java $
003     * Version: $LastChangedRevision:161 $
004     * Date:    $Date:2006-11-30 10:36:05 +0100 (Do, 30 Nov 2006) $
005     * Author:  $LastChangedBy:schnelle $
006     *
007     * JVoiceXML - A free VoiceXML implementation.
008     *
009     * Copyright (C) 2006-2010 JVoiceXML group - http://jvoicexml.sourceforge.net
010     *
011     *  This library is free software; you can redistribute it and/or
012     *  modify it under the terms of the GNU Library General Public
013     *  License as published by the Free Software Foundation; either
014     *  version 2 of the License, or (at your option) any later version.
015     *
016     *  This library is distributed in the hope that it will be useful,
017     *  but WITHOUT ANY WARRANTY; without even the implied warranty of
018     *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
019     *  Library General Public License for more details.
020     *
021     *  You should have received a copy of the GNU Library General Public
022     *  License along with this library; if not, write to the Free Software
023     *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
024     *
025     */
026    
027    package org.jvoicexml;
028    
029    import java.io.Serializable;
030    import java.net.URI;
031    
032    /**
033     * Data container that holds all the information that is needed to connect the
034     * server side resources {@link SystemOutput}, {@link UserInput}, and
035     * {@link CallControl} to the client.
036     *
037     * <p>
038     * The resources are identified using strings, e.g. <code>jsapi10</code>
039     * for an implementation based on JSAPI 1.0.
040     * </p>
041     *
042     * <p>
043     * The implementing object is created at the client side and transferred
044     * to the the JVoiceXml server via serialization. The implementation
045     * platform then calls the {@link RemoteConnectable#connect(ConnectionInformation)}
046     * method to start the communication of the client with the server side
047     * resources.
048     * </p>
049     *
050     * <p>
051     * A {@link ConnectionInformation}> may also specify the server side resource it
052     * wants to use. Each {@link SystemOutput}, {@link UserInput}, and
053     * {@link CallControl} can be identified using a unique string. If the
054     * {@link ConnectionInformation} does not specify a resource, the default resource
055     * is taken.
056     * </p>
057     *
058     * @see RemoteConnectable
059     *
060     * @author Dirk Schnelle-Walka
061     * @version $Revision:161 $
062     * @since 0.5.5
063     */
064    public interface ConnectionInformation extends Serializable {
065        /**
066         * Retrieves a unique identifier for the {@link SystemOutput} to use.
067         * @return Identifier for the {@link SystemOutput}, or <code>null</code>
068         * if the default resource should be used.
069         */
070        String getSystemOutput();
071    
072        /**
073         * Retrieves a unique identifier for the {@link UserInput} to use.
074         * @return Identifier for the {@link UserInput}, or <code>null</code>
075         * if the default resource should be used.
076         */
077        String getUserInput();
078    
079        /**
080         * Retrieves a unique identifier for the {@link CallControl} to use.
081         * @return Identifier for the {@link CallControl}, or <code>null</code>
082         * if the default resource should be used.
083         */
084        String getCallControl();
085    
086        /**
087         * Retrieves the URI of the caller device.
088         * @return URI of the caller device.
089         * @since 0.7
090         */
091        URI getCalledDevice();
092    
093        /**
094         * Retrieves the URI of the calling device.
095         * @return URI of the calling device.
096         * @since 0.7
097         */
098        URI getCallingDevice();
099    
100        /**
101         * Retrieves the name of the connection protocol.
102         * <p>
103         * The returned URI should be a URL for telephone calls as specified in
104         * <a href="http://www.ietf.org/rfc/rfc2806.txt">IETF RFC 2806</a>.
105         * </p>
106         * @return name of the connection protocol.
107         * @since 0.7
108         */
109        String getProtocolName();
110    
111        /**
112         * Retrieves the version of the connection protocol.
113         * @return version of the connection protocol.
114         * <p>
115         * The returned URI should be a URL for telephone calls as specified in
116         * <a href="http://www.ietf.org/rfc/rfc2806.txt">IETF RFC 2806</a>.
117         * </p>
118         * @since 0.7
119         */
120        String getProtocolVersion();
121    }