ComponentSession.java 1.95 KB
Newer Older
1
/*
2
 * Copyright (C) 2005-2008 Jive Software. All rights reserved.
3
 *
4 5 6 7 8 9 10 11 12 13 14
 * 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.
15
 */
16
package org.jivesoftware.openfire.session;
17 18 19 20 21 22

import org.xmpp.component.Component;

import java.util.Collection;

/**
23
 * Represents a session between the server and an external component.
24 25 26
 *
 * @author Gaston Dombiak
 */
27
public interface ComponentSession extends Session {
28

29
    public ExternalComponent getExternalComponent();
30 31 32 33 34 35 36 37 38 39

    /**
     * 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.
40 41
     *
     * @author Gaston Dombiak
42
     */
43 44
    public interface ExternalComponent extends Component {
        void setName(String name);
45

46
        String getType();
47

48
        void setType(String type);
49

50
        String getCategory();
51

52
        void setCategory(String category);
53

54
        String getInitialSubdomain();
55

56
        Collection<String> getSubdomains();
57 58
    }
}