Constructor and Description |
---|
DefaultRequest(IIJGIOWebServiceRequest originalRequest,
String serviceName)
SDK利用者向けリクエストオブジェクトおよびサービス名から内部リクエスト
オブジェクトを構築します。
|
DefaultRequest(String serviceName)
SDK利用者向けリクエストオブジェクトは指定せずに、サービス名から内部
リクエストオブジェクトを生成します。
|
Modifier and Type | Method and Description |
---|---|
void |
addHeader(String name,
String value)
リクエストに特定のヘッダを追加します。
|
void |
addParameter(String name,
String value)
リクエストに特定のパラメタを追加します。
|
InputStream |
getContent()
このリクエストに含まれるペイロードデータを持つ任意のストリームを返します。
全てのリクエストがペイロードデータを持っているわけではありません。
|
URI |
getEndpoint()
リクエストを送信するサービスのエンドポイントを取得します。
(例: "https://storage-dag.iijgio.com")
|
Map<String,String> |
getHeaders()
リクエストに含まれるヘッダのリストを取得します
|
HttpMethodName |
getHttpMethod()
このリクエストを送信する時に使われるHTTPメソッド(GET, POSTなど)を返します。
|
IIJGIOWebServiceRequest |
getOriginalRequest()
このリクエストの基となるSDK利用者向けリクエストオブジェクトを取得します。
|
Map<String,String> |
getParameters()
このリクエストに定義されている全パラメタのマップを取得します
|
String |
getResourcePath()
リクエストのリソースへのパスを取得します。
|
String |
getServiceName()
リクエストのサービス名を取得します
|
int |
getTimeOffset()
このリクエストに対する時間オフセットの任意の値を返します。
これは潜在的なクロックスキューを調整するために署名インターフェイスよって
利用されます。値は、秒単位で、正数は現時刻が「早い」、負数は「遅い」という
ニュアンスになります。
|
void |
setContent(InputStream content)
このリクエストに含まれるペイロードデータを持つ任意のストリームを設定します。
全てのリクエストがペイロードデータを持っているわけではありません。
|
void |
setEndpoint(URI endpoint)
リクエストを送信するサービスのエンドポイントを設定します。
(例: "https://storage-dag.iijgio.com")
|
void |
setHeaders(Map<String,String> headers)
既存のヘッダーを全てクリアして、全てのヘッダーを設定します。
|
void |
setHttpMethod(HttpMethodName httpMethod)
このリクエストを送信する時に使われるHTTPメソッド(GET, POSTなど)を設定します。
|
void |
setParameters(Map<String,String> parameters)
既存のパラメータを全てクリアして、全てのパラメータを設定します。
|
void |
setResourcePath(String resourcePath)
リクエストへリソースに対するパスを設定します。
|
void |
setTimeOffset(int timeOffset)
このリクエストに対する時間オフセットの任意の値を設定します。
|
String |
toString() |
Request<T> |
withParameter(String name,
String value)
リクエストにパラメタを追加し、更新したリクエストを返します。
|
Request<T> |
withTimeOffset(int timeOffset)
このリクエストに対する時間オフセットの任意の値を設定します。
|
public DefaultRequest(IIJGIOWebServiceRequest originalRequest, String serviceName)
serviceName
- このリクエストが送信するサービス名originalRequest
- この内部オブジェクトの元となるSDK利用者向けリクエストオブジェクトpublic DefaultRequest(String serviceName)
serviceName
- このリクエストが送信するサービス名public IIJGIOWebServiceRequest getOriginalRequest()
Request
getOriginalRequest
in interface Request<T>
public void addHeader(String name, String value)
Request
public Map<String,String> getHeaders()
Request
getHeaders
in interface Request<T>
public void setHeaders(Map<String,String> headers)
Request
setHeaders
in interface Request<T>
headers
- リクエストヘッダpublic String getResourcePath()
Request
getResourcePath
in interface Request<T>
public void setResourcePath(String resourcePath)
Request
setResourcePath
in interface Request<T>
resourcePath
- リソースへのパスpublic void addParameter(String name, String value)
Request
addParameter
in interface Request<T>
name
- リクエストパラメータ名value
- リクエストパラメータの値public Map<String,String> getParameters()
Request
getParameters
in interface Request<T>
public void setParameters(Map<String,String> parameters)
Request
setParameters
in interface Request<T>
parameters
- リクエストパラメータpublic Request<T> withParameter(String name, String value)
Request
withParameter
in interface Request<T>
name
- 追加するリクエストパラメータ名value
- 追加するリクエストパラメータの値public HttpMethodName getHttpMethod()
Request
getHttpMethod
in interface Request<T>
public void setHttpMethod(HttpMethodName httpMethod)
Request
setHttpMethod
in interface Request<T>
httpMethod
- このリクエストを送信する時に使われるHTTPメソッドpublic URI getEndpoint()
Request
getEndpoint
in interface Request<T>
public void setEndpoint(URI endpoint)
Request
setEndpoint
in interface Request<T>
endpoint
- サービスのエンドポイントpublic String getServiceName()
Request
getServiceName
in interface Request<T>
public InputStream getContent()
Request
getContent
in interface Request<T>
public void setContent(InputStream content)
Request
setContent
in interface Request<T>
content
- このリクエストに含まれるペイロードデータを持つ任意のストリームpublic int getTimeOffset()
Request
getTimeOffset
in interface Request<T>
public void setTimeOffset(int timeOffset)
Request
これは潜在的なクロックスキューを調整するために署名インターフェイスよって 利用されます。値は、秒単位で、正数は現時刻が「早い」、負数は「遅い」という ニュアンスになります。
setTimeOffset
in interface Request<T>
timeOffset
- このリクエストに対する時間オフセット(秒)の任意の値public Request<T> withTimeOffset(int timeOffset)
Request
これは潜在的なクロックスキューを調整するために署名インターフェイスよって 利用されます。値は、秒単位で、正数は現時刻が「早い」、負数は「遅い」という ニュアンスになります。
withTimeOffset
in interface Request<T>
timeOffset
- このリクエストに対する時間オフセット(秒)の任意の値Request.setTimeOffset(int)
Copyright © 2018. All rights reserved.