public class InetAddressDetector extends Object
修飾子とタイプ | メソッドと説明 |
---|---|
static InetAddress |
getRemoteAddress()
HTTP コンテキストから、アクセス元の IP アドレスを取得します。
|
static InetAddress |
getRemoteAddress(javax.servlet.http.HttpServletRequest request)
HTTP リクエストを指定して、アクセス元の IP アドレスを取得します。
|
public static InetAddress getRemoteAddress() throws UnknownHostException, InetAddressDetectException
ServletRequest.getRemoteAddr()
から取得を行います。UnknownHostException
- ホストの解決に失敗した場合InetAddressDetectException
- IPアドレスを取得するための準備が完了していない場合public static InetAddress getRemoteAddress(javax.servlet.http.HttpServletRequest request) throws UnknownHostException, InetAddressDetectException
ServletRequest.getRemoteAddr()
から取得を行います。request
- HTTP リクエストUnknownHostException
- ホストの解決に失敗した場合InetAddressDetectException
- IPアドレスを取得するための準備が完了していない場合Copyright © 2012 NTT DATA INTRAMART CORPORATION