Package com.streamconverter.command.impl
Class SendHttpCommand
java.lang.Object
com.streamconverter.command.AbstractStreamCommand
com.streamconverter.command.impl.SendHttpCommand
- All Implemented Interfaces:
IStreamCommand
指定された通信先にOutputStreamを送信するコマンドクラス。
-
Field Summary
Fields inherited from class com.streamconverter.command.AbstractStreamCommand
log -
Constructor Summary
ConstructorsConstructorDescriptionSendHttpCommand(String url) デフォルトコンストラクタSendHttpCommand(String url, org.springframework.web.reactive.function.client.WebClient webClient) カスタムWebClientを使用するコンストラクタ。 -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(InputStream inputStream, OutputStream outputStream) ストリームを指定されたURLに送信します。Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.streamconverter.command.IStreamCommand
commandName, withLogging, withLogging
-
Constructor Details
-
SendHttpCommand
デフォルトコンストラクタ- Parameters:
url- 送信先のURL- Throws:
IllegalArgumentException- URLが無効な場合
-
SendHttpCommand
public SendHttpCommand(String url, org.springframework.web.reactive.function.client.WebClient webClient) カスタムWebClientを使用するコンストラクタ。主にテストや特殊なHTTPクライアント設定のために使用する。URLの検証は通常コンストラクタと同様に適用する。
- Parameters:
url- 送信先のURLwebClient- 使用するWebClient
-
-
Method Details
-
execute
ストリームを指定されたURLに送信します。- Specified by:
executein interfaceIStreamCommand- Specified by:
executein classAbstractStreamCommand- Parameters:
inputStream- 入力ストリームoutputStream- 出力ストリーム- Throws:
IOException- 入出力エラーが発生した場合
-