⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gateway.java

📁 Jive是基于JSP/JAVA技术构架的一个大型BBS论坛系统,这是Jive论坛2.6版本的源程序
💻 JAVA
字号:
/** * $RCSfile: Gateway.java,v $ * $Revision: 1.2 $ * $Date: 2002/03/08 03:45:26 $ * * Copyright (C) 1999-2002 CoolServlets, Inc. All rights reserved. * * This software is the proprietary information of CoolServlets, Inc. * Use is subject to license terms. */package com.jivesoftware.forum.gateway;import com.jivesoftware.forum.*;import java.util.Date;/** * A Gateway synchronizes a forum and an external data source such as a NNTP * newsgroup, or mailing list (through a POP3 account and SMTP). Each gateway must * know how to import data from the external source as new messages that are * added to an existing forum, and how to export individual messages to the * source.<p> * * The GatewayManager class manages Gateways and is responsible for periodically * calling the import and export methods (as specified by the end user). * Therefore, the forum and external data source that the Gateway bridges, are * never guaranteed to be exactly in synch. * * @see GatewayManager */public class Gateway implements GatewayImporter, GatewayExporter {    private GatewayImporter importer;    private GatewayExporter exporter;    public Gateway(GatewayImporter importer, GatewayExporter exporter) {        this.importer = importer;        this.exporter = exporter;    }    public void importData(Date date) throws GatewayException {        importer.importData(date);    }    public void exportData(ForumMessage message) throws GatewayException {        exporter.exportData(message);    }    public void exportData(ForumMessage [] messages) throws GatewayException {        exporter.exportData(messages);    }    /**     * Returns the GatewayImporter associated with this gateway.     *     * @return the importer.     */    public GatewayImporter getGatewayImporter() {        return importer;    }    /**     * Returns the GatewayExporter associated with this gateway.     *     * @return the exporter.     */    public GatewayExporter getGatewayExporter() {        return exporter;    }    /**     * Stops any currently running imports and exports.     */    public void stop() throws GatewayException {        importer.stop();        exporter.stop();    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -