クラス PortMapperImpl

java.lang.ObjectSE
org.springframework.security.web.PortMapperImpl
実装されたすべてのインターフェース:
PortMapper

public class PortMapperImpl extends ObjectSE implements PortMapper
アプリケーションコンテキストから HTTP:HTTPS ペアを取得する PortMapper の具体的な実装。

デフォルトでは、実装は 80:443 および 8080:8443 がそれぞれ HTTP:HTTPS ペアであると想定します。異なるペアが必要な場合は、setPortMappings(Map) を使用してください。

  • コンストラクターの詳細

    • PortMapperImpl

      public PortMapperImpl()
  • メソッドの詳細

    • getTranslatedPortMappings

      public MapSE<IntegerSE,IntegerSE> getTranslatedPortMappings()
      setHttpsPortMapping() を介して指定された元のポートマッピングの変換された(整数 -> 整数)バージョンを返します
    • lookupHttpPort

      public IntegerSE lookupHttpPort(IntegerSE httpsPort)
      インターフェースからコピーされた説明: PortMapper
      指定された HTTPS ポートに関連付けられている HTTP ポートを検索します。

      不明な場合は null を返します。

      次で指定:
      インターフェース PortMapperlookupHttpPort 
      戻り値:
      HTTP ポートまたは不明な場合は null 
    • lookupHttpsPort

      public IntegerSE lookupHttpsPort(IntegerSE httpPort)
      インターフェースからコピーされた説明: PortMapper
      指定された HTTP ポートに関連付けられている HTTPS ポートを検索します。

      不明な場合は null を返します。

      次で指定:
      インターフェース PortMapperlookupHttpsPort 
      戻り値:
      HTTPS ポートまたは不明な場合は null 
    • setPortMappings

      public void setPortMappings(MapSE<StringSE,StringSE> newMappings)
      80:443,, 8080:8443 のデフォルトの HTTP ポートから HTTPS ポートへのマッピングを上書きするように設定します。Spring XML ApplicationContext では、定義は次のようになります。
        <property name="portMappings">
            <map>
                <entry key="80"><value>443</value></entry>
                <entry key="8080"><value>8443</value></entry>
            </map>
       </property>
       
      パラメーター:
      newMappings - 文字列キーと文字列値で構成されるマップ。各エントリのキーは整数 HTTP ポート番号の文字列表現であり、値は対応する整数 HTTPS ポート番号の文字列表現です。
      例外:
      IllegalArgumentExceptionSE - 入力マップが文字列キーと値で構成されていない場合、それぞれがそのマッピングの 1-65535 の範囲の整数ポート番号を表します。