org.seasar.cubby.internal.controller
クラス ThreadContext

java.lang.Object
  上位を拡張 org.seasar.cubby.internal.controller.ThreadContext

public class ThreadContext
extends Object

実行スレッドのコンテキスト情報です。

作成者:
baba

入れ子のクラスの概要
static interface ThreadContext.Command
          コンテキスト内で実行するコマンドのインターフェイスです。
 
メソッドの概要
static Map<String,Object> getMessagesMap()
          getMessagesResourceBundle() で取得できる ResourceBundle を変換した Map を取得します。
static ResourceBundle getMessagesResourceBundle()
          現在の実行スレッドに関連付けられた要求に対応するメッセージ用の ResourceBundle を取得します。
static HttpServletRequest getRequest()
          現在の実行スレッドに関連付けられた要求を取得します。
static HttpServletResponse getResponse()
          現在の実行スレッドに関連付けられた応答を取得します。
static void runInContext(HttpServletRequest request, HttpServletResponse response, ThreadContext.Command command)
          指定されたコマンドを新しいコンテキスト内で実行します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

getRequest

public static HttpServletRequest getRequest()
現在の実行スレッドに関連付けられた要求を取得します。

戻り値:
要求

getResponse

public static HttpServletResponse getResponse()
現在の実行スレッドに関連付けられた応答を取得します。

戻り値:
応答

getMessagesResourceBundle

public static ResourceBundle getMessagesResourceBundle()
現在の実行スレッドに関連付けられた要求に対応するメッセージ用の ResourceBundle を取得します。

戻り値:
リソースバンドル

getMessagesMap

public static Map<String,Object> getMessagesMap()
getMessagesResourceBundle() で取得できる ResourceBundle を変換した Map を取得します。

戻り値:
メッセージの Map

runInContext

public static void runInContext(HttpServletRequest request,
                                HttpServletResponse response,
                                ThreadContext.Command command)
                         throws Exception
指定されたコマンドを新しいコンテキスト内で実行します。

パラメータ:
request - 要求
response - 応答
command - コンテキスト内で実行するコマンド
例外:
Exception - コマンドの実行中に例外が発生した場合


Copyright © 2006-2009 The Seasar Foundation. All Rights Reserved.