Class V2Session
- All Implemented Interfaces:
Closeable,AutoCloseable,CTISession
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected jp.cssj.rsr.RandomBuilderprotected final Stringprotected MessageHandlerprotected final Stringprotected V2ContentProducerprotected ProgressListenerprotected V2RequestConsumerprotected jp.cssj.resolver.SourceResolverprotected Resultsprotected intprotected final URIprotected final StringFields inherited from interface jp.cssj.cti2.CTISession
ABORT_FORCE, ABORT_NORMAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort(byte mode) 変換を中断します。 このメソッドは非同期的に(別スレッドから)呼び出す必要があります。 実際に処理が中断された場合は、変換処理を行なっている(transcodeを呼び出した )スレッドで、TranscoderExceptionがスローされます。protected booleanvoidclose()セッションをクローズします。getServerInfo(URI uri) サーバー情報を返します。 詳細はCopper PDF ドキュメントを参照して下さい。protected voidinit()voidjoin()setContinues(true) が設定された状態で、複数回のtranscodeにより生成された結果を結合して出力します。protected voidnext()voidプロパティを設定します。voidreset()送られたリソースと、プロパティ、メッセージハンドラ等の全ての設定をクリアして、セッションが作られた時点と同じ初期状態に戻します。resource(jp.cssj.resolver.MetaSource metaSource) リソースを送信するための出力ストリームを返します。voidresource(jp.cssj.resolver.Source source) リソースを送信します。voidsendResource(jp.cssj.resolver.Source source) voidsetContinuous(boolean continuous) 複数の結果を結合するモードに切り替えます。voidメッセージを受け取るためのオブジェクトを設定します。void進行状況を監視するためのオブジェクトを設定します。voidsetResults(Results results) 出力先を設定します。voidsetSourceResolver(jp.cssj.resolver.SourceResolver resolver) リソースを読み込むためのオブジェクトを設定します。void指定されたアドレスへサーバー側からアクセスしてメインドキュメントを取得して変換します。 resourceメソッドで事前に送信したリソースに対しても有効です。transcode(jp.cssj.resolver.MetaSource metaSource) メインドキュメントを送信するための出力ストリームを返します。voidtranscode(jp.cssj.resolver.Source source) メインドキュメントをデータソースから取得して変換します。Methods inherited from class jp.cssj.cti2.helpers.AbstractCTISession
finalize
-
Field Details
-
BUFFER_SIZE
public static final int BUFFER_SIZE- See Also:
-
encoding
-
uri
-
user
-
password
-
producer
-
request
-
results
-
resolver
protected jp.cssj.resolver.SourceResolver resolver -
messageHandler
-
progressListener
-
state
protected int state -
builder
protected jp.cssj.rsr.RandomBuilder builder
-
-
Constructor Details
-
V2Session
- Throws:
IOException
-
-
Method Details
-
init
- Throws:
IOException
-
getServerInfo
Description copied from interface:CTISessionサーバー情報を返します。 詳細はCopper PDF ドキュメントを参照して下さい。- Specified by:
getServerInfoin interfaceCTISession- Parameters:
uri- サーバー情報を選択するためのURI。- Returns:
- サーバー情報データのストリーム。
- Throws:
IOException
-
setResults
Description copied from interface:CTISession出力先を設定します。
このメソッドは各transcodeメソッドの前に呼ぶ必要があります。
- Specified by:
setResultsin interfaceCTISession- Parameters:
results- 出力先。- Throws:
IOException
-
setMessageHandler
Description copied from interface:CTISessionメッセージを受け取るためのオブジェクトを設定します。
このメソッドは各transcodeメソッドの前に呼ぶ必要があります。
- Specified by:
setMessageHandlerin interfaceCTISession- Parameters:
eh- メッセージハンドラ- See Also:
-
setProgressListener
Description copied from interface:CTISession進行状況を監視するためのオブジェクトを設定します。
このメソッドは各transcodeメソッドの前に呼ぶ必要があります。
- Specified by:
setProgressListenerin interfaceCTISession- Parameters:
l- 進行状況リスナ- See Also:
-
property
Description copied from interface:CTISessionプロパティを設定します。
このメソッドは各transcodeメソッドの前に呼ぶ必要があります。
- Specified by:
propertyin interfaceCTISession- Parameters:
key- プロパティ名value- 値- Throws:
IOException
-
resource
Description copied from interface:CTISessionリソースを送信するための出力ストリームを返します。
リソースを送信した後、出力ストリームは必ずクローズしてください。
このメソッドは各transcodeメソッドの前に呼ぶ必要があります。
- Specified by:
resourcein interfaceCTISession- Parameters:
metaSource- リソースデータのメタ情報。- Returns:
- サーバーへの出力ストリーム。
- Throws:
IOException
-
resource
Description copied from interface:CTISessionリソースを送信します。
このメソッドは各transcodeメソッドの前に呼ぶ必要があります。
- Specified by:
resourcein interfaceCTISession- Parameters:
source- リソースのデータソース。- Throws:
IOException
-
buildNext
- Throws:
IOExceptionTranscoderException
-
transcode
public OutputStream transcode(jp.cssj.resolver.MetaSource metaSource) throws IOException, TranscoderException Description copied from interface:CTISessionメインドキュメントを送信するための出力ストリームを返します。
本体を送信した後、出力ストリームは必ずクローズしてください。
- Specified by:
transcodein interfaceCTISession- Parameters:
metaSource- メインドキュメントのメタ情報。- Returns:
- サーバーへの出力ストリーム。
- Throws:
IOExceptionTranscoderException
-
transcode
Description copied from interface:CTISession指定されたアドレスへサーバー側からアクセスしてメインドキュメントを取得して変換します。 resourceメソッドで事前に送信したリソースに対しても有効です。
- Specified by:
transcodein interfaceCTISession- Parameters:
uri- メインドキュメントのURI。- Throws:
IOExceptionTranscoderException
-
transcode
Description copied from interface:CTISessionメインドキュメントをデータソースから取得して変換します。
- Specified by:
transcodein interfaceCTISession- Parameters:
source- メインドキュメントのデータソース。- Throws:
IOExceptionTranscoderException
-
next
- Throws:
IOException
-
setContinuous
Description copied from interface:CTISession複数の結果を結合するモードに切り替えます。
- Specified by:
setContinuousin interfaceCTISession- Parameters:
continuous- trueであればjoinにより結果を結合するモードにします。- Throws:
IOException
-
join
Description copied from interface:CTISessionsetContinues(true) が設定された状態で、複数回のtranscodeにより生成された結果を結合して出力します。
- Specified by:
joinin interfaceCTISession- Throws:
IOException
-
setSourceResolver
Description copied from interface:CTISessionリソースを読み込むためのオブジェクトを設定します。
- Specified by:
setSourceResolverin interfaceCTISession- Parameters:
resolver- サーバー側から要求したリソースを取得するためのSourceResolver。- Throws:
IOException
-
sendResource
- Throws:
IOException
-
abort
Description copied from interface:CTISession変換を中断します。 このメソッドは非同期的に(別スレッドから)呼び出す必要があります。 実際に処理が中断された場合は、変換処理を行なっている(transcodeを呼び出した )スレッドで、TranscoderExceptionがスローされます。
- Specified by:
abortin interfaceCTISession- Parameters:
mode- きりのよいところまで出力する場合はABORT_NORMAL、強制的に処理を停止するにはABORT_FORCEを指定します。- Throws:
IOException
-
reset
Description copied from interface:CTISession送られたリソースと、プロパティ、メッセージハンドラ等の全ての設定をクリアして、セッションが作られた時点と同じ初期状態に戻します。
- Specified by:
resetin interfaceCTISession- Throws:
IOException
-
close
Description copied from interface:CTISessionセッションをクローズします。
このメソッドを呼び出した後は、セッションに対して何も出来ません。
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceCTISession- Throws:
IOException
-