Hitachi

EUR 帳票出力 リファレンス EUR Server編(UNIX(R)用)


getDestinationListメソッド

出力先として登録されているスプールサーバの一覧を取得します。

〈このページの構成〉

形式

public ArrayList[] getDestinationList() throws EURPMException

解説

getDestinationListメソッドは,EUR Server Serviceに登録された出力先の一覧を取得します。出力先の一覧は,出力先定義ファイルから取得します。取得できる情報は,定義された出力先の情報です。スプールサーバの稼働状況は取得できません。

メソッド実行時にエラーが発生した場合,getErrorCodeメソッドに終了コード,getMessageメソッドにメッセージが設定されます。

引数

なし

戻り値

出力先の一覧を次に示す形式で返します。

出力先名1,IPアドレス1,説明1
出力先名2,IPアドレス2,説明2
              :     

例外処理

EURPMException

エラー発生時は,EURPMException例外がスローされます。

呼び出し例

getDestinationListメソッドの呼び出し例を次に示します。

try {
  adp = new EURPMAdapterForJava();
}
catch (Exception e) {
  System.out.println("Adapterオブジェクト生成エラー");
}
System.out.println("getDestinationList実行");
try {
  ArrayList[] alDestinations = adp.getDestinationList();
  for(cntj = 0 ; cntj < alDestinations[0].size() ; cntj++){
    System.out.println("出力先名  [" + cntj + "]=[" + 
      alDestinations[0].get(cntj) + "]");
    System.out.println("IPアドレス[" + cntj + "]=[" + 
      alDestinations[1].get(cntj) + "]");
    System.out.println("説明      [" + cntj + "]=[" + 
      alDestinations[2].get(cntj) + "]");
  }
}
catch (EURPMException e) {
  int iCode = e.getErrorCode();
  System.out.println(Integer.toString(iCode));
  System.out.println(e.getMessage());
  System.out.println(e.getKey());
  e.printStackTrace();
}