📄 gateway.java
字号:
/**
* $RCSfile: Gateway.java,v $
* $Revision: 1.4 $
* $Date: 2001/07/31 05:37:14 $
*
* Copyright (C) 1999-2001 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 interface Gateway {
/**
* Import data from the data source into the specified forum. For example,
* a concrete implementation of this interface might poll a newsgroup and
* add new messages to the forum.
*
* @param date the oldest cutoff date for data to import.
*/
public void importData(Date date) throws GatewayException;
/**
* Export a single message to the data source. For example, a concrete
* implementation of this interface might post the message to a newsgroup.
*/
public void exportData(ForumMessage message) throws GatewayException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -