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 */
016
017package org.opengion.fukurou.queue;
018
019/**
020 * キュー送信クラス用インタフェース
021 * キュー送信クラス実装用のインタフェースです。
022 *
023 * @og.rev 5.10.14.0 (2019/08/01) 新規作成
024 *
025 */
026public interface QueueSend {
027//      /**
028//       * 接続処理
029//       * メッセージキューサーバに接続します。
030//       *
031//       * @param jmsServer jmsServer接続先
032//       */
033//      void connect(final String jmsServer);
034
035        /**
036         * 接続処理
037         * キー情報を利用してメッセージキューサーバに接続します。
038         * SQSサーバの利用で、アクセスキーを利用した接続を行う場合用です。
039         * MQサーバの場合は、キーは利用されず、connect(final String jmsServer)と同様の動作になります。
040         *
041         * @og.rev 5.10.15.0 (2019/08/30) 引数追加
042         *
043         * @param jmsServer JMSサーバ接続先
044         * @param sqsAccessKey アクセスキー
045         * @param sqsSecretKey シークレットキー
046         */
047        void connect(final String jmsServer, final String sqsAccessKey, final String sqsSecretKey);
048
049        /**
050         * メッセージ送信処理
051         * キューサーバにメッセージを送信します。
052         *
053         * @param queueInfo 送信キュー情報
054         */
055        void sendMessage(final QueueInfo queueInfo);
056
057        /**
058         * クローズ処理
059         * キューサーバの接続をクローズします。
060         *
061         */
062        void close();
063
064        /**
065         * バッチ処理判定
066         * バッチ処理判定を設定します。
067         *
068         * @param batchFlg バッチ処理判定
069         */
070        void setBatchFlg(final Boolean batchFlg);
071}