|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object jp.go.aist.dmrc.platform.beans.io.PFNetworkClient
public class PFNetworkClient
ネットワークに接続して情報を取得するためのコンポーネント。 提供する機能は以下の通り。
このコンポーネントから発生するイベントは以下の通り。
トリガ | 結果データ | イベント番号 |
---|---|---|
接続エラー | メッセージ(String) | 0 |
日時の取得要求 | 日時情報(Date) | 1 |
コンストラクタの概要 | |
---|---|
PFNetworkClient()
コンストラクタ。 |
メソッドの概要 | |
---|---|
void |
addPFProcessRequestListener(PFProcessRequestListener lis)
引数で与えられたイベントリスナを登録し、 処理要求イベント発生時に処理を行う対象とする。 |
void |
addPFProcessTerminateListener(PFProcessTerminateListener lis)
引数で与えられたイベントリスナを登録し、 処理完了イベント発生時に処理を行う対象とする。 |
boolean |
canGetContentFromURL(java.lang.String url)
URL指定でデータが取得可能か判定する。 |
void |
connectViaNTP(java.lang.String hostname)
NTPサーバに接続して日時情報を要求する。 |
protected java.lang.Object |
firePFProcessRequested(PFProcessRequestEvent event)
処理要求イベントを発生させる。 |
protected void |
firePFProcessTerminated(PFProcessTerminateEvent event)
処理完了イベントを発生させる。 |
int |
getComponentID()
コンポーネントIDを取得する。 |
java.lang.String |
getComponentKey()
コンポーネントキーを取得する。 |
PFMultiLocaleString |
getComponentKeys()
全ロケール分のコンポーネントキーを返す。 |
java.lang.String |
getComponentName()
コンポーネント名称を取得する。 |
java.lang.String |
getComponentPublicName()
コンポーネント公開名を取得する. |
java.lang.String |
getComponentString()
コンポーネントの文字列表現を取得する。 |
java.lang.String |
getContentAsTextFromURL(java.lang.String url)
URL指定でデータを文字列として取得する。 |
java.util.Date |
getDateByNTP(java.lang.String hostname)
NTPサーバから日時情報を取得する。 |
java.lang.String |
getHostAddress(java.lang.String hostname)
ホスト名からIPアドレスを文字列として取得する。 |
java.lang.String |
getHostName(java.lang.String address)
IPアドレスの文字列表現からホスト名を取得する。 |
java.util.Date |
getLastModifiedFromURL(java.lang.String url)
URL指定でデータの最終更新日時を取得する。 |
java.util.Iterator |
getPFProcessRequestListenerList()
処理要求イベントリスナ配列を取得する。 |
java.util.Iterator |
getPFProcessTerminateListenerList()
処理完了イベントリスナ配列を取得する。 |
int |
getTimeout()
接続のタイムアウト時間を取得する。 |
boolean |
isAllowPullTransfer()
他PFからのPull型コンポーネント転送要求に対する可否属性を取得する. |
boolean |
isAllowPushTransfer()
他PFへのPush型コンポーネント転送要求に対する可否属性を取得する. |
boolean |
isAllowRemoteInvocation()
他PFからのコンポーネント連携要求に対する可否属性を取得する. |
void |
localeUpdated()
ロケール変更に対応する。 |
void |
readXML(PFXMLLoader in)
コンポーネントのXML入力. |
void |
removePFProcessRequestListener(PFProcessRequestListener lis)
引数で与えられたイベントリスナを削除し、 処理要求イベント発生時に処理を行う対象から外す。 |
void |
removePFProcessTerminateListener(PFProcessTerminateListener lis)
引数で与えられたイベントリスナを削除し、 処理完了イベント発生時に処理を行う対象から外す。 |
void |
saveContentFromURL(java.lang.String url,
java.lang.String filename)
URL指定でデータをダウンロードして保存する。 |
void |
setAllowPullTransfer(boolean flag)
他PFからのPull型コンポーネント転送要求に対する可否属性を設定する. |
void |
setAllowPushTransfer(boolean flag)
他PFへのPush型コンポーネント転送要求に対する可否属性を設定する. |
void |
setAllowRemoteInvocation(boolean flag)
他PFからのコンポーネント連携要求に対する可否属性を設定する. |
void |
setComponentID(int id)
コンポーネントIDを設定する。 |
void |
setComponentKey(java.lang.String key)
コンポーネントキーを設定する。 |
void |
setComponentKeys(PFMultiLocaleString keys)
全ロケール分のコンポーネントキーを設定する。 |
void |
setComponentPublicName(java.lang.String publicName)
コンポーネント公開名を設定する. |
void |
setTimeout(int duration)
接続のタイムアウト時間を設定する。 |
void |
writeXML(PFXMLGenerator out)
コンポーネントのXML出力. |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public PFNetworkClient()
メソッドの詳細 |
---|
public java.lang.String getComponentName()
PFComponent
内の getComponentName
public java.lang.String getComponentKey()
PFComponent
内の getComponentKey
public void setComponentKey(java.lang.String key)
PFComponent
内の setComponentKey
key
- コンポーネントキーpublic PFMultiLocaleString getComponentKeys()
public void setComponentKeys(PFMultiLocaleString keys)
keys
- 全ロケール分のコンポーネントキーpublic int getComponentID()
PFComponent
内の getComponentID
public void setComponentID(int id)
PFComponentBus
から設定される。
各コンポーネント内では操作しないこと。
PFComponent
内の setComponentID
id
- 設定するコンポーネントIDpublic java.lang.String getComponentString()
PFComponent
内の getComponentString
public java.lang.String getComponentPublicName()
PFComponent
内の getComponentPublicName
public void setComponentPublicName(java.lang.String publicName) throws PFComponentException
PFComponent
内の setComponentPublicName
publicName
- 設定するコンポーネント公開名
PFComponentException
- 規約に反する名前が設定されようとした場合public boolean isAllowRemoteInvocation()
PFComponent
内の isAllowRemoteInvocation
public void setAllowRemoteInvocation(boolean flag)
PFComponent
内の setAllowRemoteInvocation
flag
- コンポーネント連携要求に対する可否public boolean isAllowPullTransfer()
PFComponent
内の isAllowPullTransfer
public void setAllowPullTransfer(boolean flag)
PFComponent
内の setAllowPullTransfer
flag
- Pull型コンポーネント転送要求に対する可否public boolean isAllowPushTransfer()
PFComponent
内の isAllowPushTransfer
public void setAllowPushTransfer(boolean flag)
PFComponent
内の setAllowPushTransfer
flag
- Push型コンポーネント転送要求に対する可否public java.util.Iterator getPFProcessTerminateListenerList()
PFProcessTerminateEventSource
内の getPFProcessTerminateListenerList
public void addPFProcessTerminateListener(PFProcessTerminateListener lis)
PFProcessTerminateEventSource
内の addPFProcessTerminateListener
lis
- 追加対象イベントリスナpublic void removePFProcessTerminateListener(PFProcessTerminateListener lis)
PFProcessTerminateEventSource
内の removePFProcessTerminateListener
lis
- 削除対象イベントリスナprotected void firePFProcessTerminated(PFProcessTerminateEvent event) throws PFMethodException, PFRuntimeException
event
- 処理完了イベント
PFMethodException
- イベント伝播先のメソッド起動時のエラー
PFRuntimeException
- 予期しない実行時エラーpublic java.util.Iterator getPFProcessRequestListenerList()
PFProcessRequestEventSource
内の getPFProcessRequestListenerList
public void addPFProcessRequestListener(PFProcessRequestListener lis)
PFProcessRequestEventSource
内の addPFProcessRequestListener
lis
- 追加対象イベントリスナpublic void removePFProcessRequestListener(PFProcessRequestListener lis)
PFProcessRequestEventSource
内の removePFProcessRequestListener
lis
- 削除対象イベントリスナprotected java.lang.Object firePFProcessRequested(PFProcessRequestEvent event) throws PFMethodException, PFRuntimeException
event
- 処理要求イベント
PFMethodException
- イベント伝播先のメソッド起動時のエラー
PFRuntimeException
- 予期しない実行時エラーpublic void localeUpdated()
PFComponent
内の localeUpdated
PFComponent.localeUpdated()
public void readXML(PFXMLLoader in)
PFXMLSerializable
内の readXML
in
- XML入力ユーティリティpublic void writeXML(PFXMLGenerator out) throws java.io.IOException
PFXMLSerializable
内の writeXML
out
- XML出力ユーティリティ
java.io.IOException
public java.util.Date getDateByNTP(java.lang.String hostname) throws PFComponentException
hostname
- サーバ名
PFComponentException
- 取得失敗public void connectViaNTP(java.lang.String hostname) throws PFException
hostname
- サーバ名
PFException
- イベント処理失敗public java.lang.String getHostAddress(java.lang.String hostname)
hostname
- ホスト名
public java.lang.String getHostName(java.lang.String address)
address
- IPアドレスの文字列表現
public boolean canGetContentFromURL(java.lang.String url)
url
- データのURL
public java.util.Date getLastModifiedFromURL(java.lang.String url) throws PFComponentException
url
- データのURL
PFComponentException
public void saveContentFromURL(java.lang.String url, java.lang.String filename) throws PFComponentException
url
- ダウンロード元URLfilename
- 保存するファイル名
PFComponentException
- 各種例外:URLが存在しない場合などpublic java.lang.String getContentAsTextFromURL(java.lang.String url) throws PFComponentException
url
- ダウンロード元URL
PFComponentException
- 各種例外:URLが存在しない場合などpublic int getTimeout()
public void setTimeout(int duration)
duration
- 時間(msec)
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |