ComponentSession.java 2.07 KB
Newer Older
1 2 3 4 5
/**
 * $RCSfile: ComponentSession.java,v $
 * $Revision: 3174 $
 * $Date: 2005-12-08 17:41:00 -0300 (Thu, 08 Dec 2005) $
 *
6
 * Copyright (C) 2005-2008 Jive Software. All rights reserved.
7
 *
8 9 10 11 12 13 14 15 16 17 18
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
19
 */
20
package org.jivesoftware.openfire.session;
21 22 23 24 25 26

import org.xmpp.component.Component;

import java.util.Collection;

/**
27
 * Represents a session between the server and an external component.
28 29 30
 *
 * @author Gaston Dombiak
 */
31
public interface ComponentSession extends Session {
32

33
    public ExternalComponent getExternalComponent();
34 35 36 37 38 39 40 41 42 43

    /**
     * The ExternalComponent acts as a proxy of the remote connected component. Any Packet that is
     * sent to this component will be delivered to the real component on the other side of the
     * connection.<p>
     *
     * An ExternalComponent will be added as a route in the RoutingTable for each connected
     * external component. This implies that when the server receives a packet whose domain matches
     * the external component services address then a route to the external component will be used
     * and the packet will be forwarded to the component on the other side of the connection.
44 45
     *
     * @author Gaston Dombiak
46
     */
47 48
    public interface ExternalComponent extends Component {
        void setName(String name);
49

50
        String getType();
51

52
        void setType(String type);
53

54
        String getCategory();
55

56
        void setCategory(String category);
57

58
        String getInitialSubdomain();
59

60
        Collection<String> getSubdomains();
61 62
    }
}