001/* 002 * Copyright (c) 2009 The openGion Project. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 013 * either express or implied. See the License for the specific language 014 * governing permissions and limitations under the License. 015 */ 016package org.opengion.fukurou.queue; 017 018/** 019 * キュー送信クラス用インタフェース 020 * キュー送信クラス実装用のインタフェースです。 021 * 022 * @og.rev 5.10.14.0 (2019/08/01) 新規作成 023 * 024 */ 025public interface QueueSend { 026// /** 027// * 接続処理 028// * メッセージキューサーバに接続します。 029// * 030// * @param jmsServer jmsServer接続先 031// */ 032// void connect(final String jmsServer); 033 034 /** 035 * 接続処理 036 * キー情報を利用してメッセージキューサーバに接続します。 037 * SQSサーバの利用で、アクセスキーを利用した接続を行う場合用です。 038 * MQサーバの場合は、キーは利用されず、connect(final String jmsServer)と同様の動作になります。 039 * 040 * @og.rev 5.10.15.0 (2019/08/30) 引数追加 041 * 042 * @param jmsServer JMSサーバ接続先 043 * @param sqsAccessKey アクセスキー 044 * @param sqsSecretKey シークレットキー 045 */ 046 void connect(final String jmsServer, final String sqsAccessKey, final String sqsSecretKey); 047 048 /** 049 * メッセージ送信処理 050 * キューサーバにメッセージを送信します。 051 * 052 * @param queueInfo 送信キュー情報 053 */ 054 void sendMessage(final QueueInfo queueInfo); 055 056 /** 057 * クローズ処理 058 * キューサーバの接続をクローズします。 059 * 060 */ 061 void close(); 062 063 /** 064 * バッチ処理判定 065 * バッチ処理判定を設定します。 066 * 067 * @param batchFlg バッチ処理判定 068 */ 069 void setBatchFlg(final Boolean batchFlg); 070}