jp.co.fujitsu.reffi.client.swing.model
クラス AbstractHTTPCore

java.lang.Object
  上位を拡張 jp.co.fujitsu.reffi.client.swing.model.BaseModel
      上位を拡張 jp.co.fujitsu.reffi.client.swing.model.AbstractHTTPCore
すべての実装されたインタフェース:
java.util.concurrent.Callable<java.lang.Object>, Model
直系の既知のサブクラス:
HTTPRequestCore, WebServiceCore

public abstract class AbstractHTTPCore
extends BaseModel

[概 要]

HTTP通信を行う機能モデルクラスの基底クラスです。

[詳 細]

BASIC認証、DIGEST認証が掛かったサーバと通信する際に使用される Authenticatorを設定します。

[備 考]

このクラスは内部的にAuthenticator#setDefault(Authenticator)を実行します。
この為、以降のHTTP通信ではAuthenticatorが有効になったままです。
別途Authenticatorが必要なサーバと通信する際は再度 setAuthentication(String, char[])を実行して下さい。

[環 境] JDK 6.0 Update 11

Copyright (c) 2008-2009 FUJITSU Japan All rights reserved.

作成者:
Project Reffi

コンストラクタの概要
AbstractHTTPCore()
           
 
メソッドの概要
protected  java.lang.String createCookieString()
          [概 要] Cookie文字列を作成します。
 char[] getAuthPassword()
          [概 要] 認証パスワードを取得します。
 java.lang.String getAuthUser()
          [概 要] 認証ユーザ名を取得します。
 boolean isSendCookie()
          [概 要] クッキー送信するかどうかを返却します。
 void removeAuthentication()
          [概 要] 設定されているAuthenticatorを削除します。
 void setAuthentication(java.lang.String user, char[] password)
          [概 要] Authenticatorを設定します。
 void setSendCookie(boolean sendCookie)
          [概 要] クッキー送信するかどうかを設定します。
 
クラス jp.co.fujitsu.reffi.client.swing.model.BaseModel から継承されたメソッド
addModelProcessListener, call, done, finalproc, fireModelFailure, fireModelFinished, fireModelSuccess, getController, getExecuteIndex, getListenerList, getParameterMapping, getResult, getSuccessCount, incrementSuccessCount, init, isAsync, isSkip, mainproc, postproc, preproc, removeModelProcessListener, run, setAsync, setController, setExecuteIndex, setListenerList, setParameterMapping, setResult, setSkip, trap
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

AbstractHTTPCore

public AbstractHTTPCore()
メソッドの詳細

getAuthUser

public java.lang.String getAuthUser()

[概 要]

認証ユーザ名を取得します。

[詳 細]

authUserフィールドを返却します。

[備 考]

戻り値:
認証ユーザ名

getAuthPassword

public char[] getAuthPassword()

[概 要]

認証パスワードを取得します。

[詳 細]

authPasswordフィールドを返却します。

[備 考]

戻り値:
認証パスワード

isSendCookie

public boolean isSendCookie()

[概 要]

クッキー送信するかどうかを返却します。

[詳 細]

sendCookieフィールドを返却します。

[備 考]

戻り値:
クッキー送信有無

setSendCookie

public void setSendCookie(boolean sendCookie)

[概 要]

クッキー送信するかどうかを設定します。

[詳 細]

sendCookieフィールドを設定します。

[備 考]

パラメータ:
sendCookie - クッキー送信有無

setAuthentication

public void setAuthentication(java.lang.String user,
                              char[] password)

[概 要]

Authenticatorを設定します。

[詳 細]

user、passwordはフィールドに保存されます。
指定されたuser、passwordでPasswordAuthenticationインスタンスを 生成、返却するAuthenticatorを作成して、Authenticatorに対して setDefaultで設定します。

[備 考]

パラメータ:
user - 認証ユーザ
password - 認証パスワード

removeAuthentication

public void removeAuthentication()

[概 要]

設定されているAuthenticatorを削除します。

[詳 細]

authUserフィールド、authPasswordフィールドにnullを設定して、 Authenticator.setDefault(null)を実行します。

[備 考]


createCookieString

protected java.lang.String createCookieString()

[概 要]

Cookie文字列を作成します。

[詳 細]

メモリ上のCookieManagerが保持しているクッキーの値を、 「キー名=値;キー名=値;...」のフォーマットで連結します。

[備 考]

戻り値:
Cookie文字列


Copyright © 2008-2010. All Rights Reserved.