プロトコル・ハンドラー・フレームワークのメソッド

次のセクションでは、新しいプロトコル・ハンドラーを設計したり、既存のプロトコル・ハンドラーを修正するときに使用するプロトコル・ハンドラー・フレームワークのメソッドについて説明します。

getContent ()

getContent() メソッドは、ビジネス・オブジェクト処理用に使用されます。このメソッドの実行内容は次のとおりです。

構文

public String getContent (object input, String mimeType,
 Sting BOPrefix) throws IOException
 

パラメーター

input
ビジネス・オブジェクト・インターフェース (送信対象のビジネス・オブジェクト) を指定します。

mimeType
データ・ハンドラーに渡すデータの MIME タイプを指定します。

BOprefix
データ・ハンドラーに渡すデータの BOPrefix を指定します。

戻り値

ビジネス・オブジェクト・インターフェースを戻します。

WebSphere Business Integration Server Express Adapter 提供のプロトコル・ハンドラーの呼び出し

次のコードに、WebSphere Business Integration Server Express Adapter 提供のプロトコル・ハンドラーを呼び出す方法を示します。

try 
 {
 // set the system property, so that Java knows where to look for
 // the protocol handlers. You only need to do it once.
 Properties prop = System.getProperties();
 prop.put("java.protocol.handler.pkgs,"
 "com.crossworlds.connectors.utils.ProtocolHandlers");
  
 URL url = new URL("http://www.crossworlds.com");
 CWURLConnection uc = (CWURLConnection) url.openConnection();
 BusinessObjectInterface respBO = (BusinessObjectInterface)
 uc.getContent (input, mime, prefix);
  
 }
 catch (Exception XX)
 {
 //flag error
 }
 

Copyright IBM Corp. 2004