Protocol handler framework methods

The following section describes the Protocol Handler Framework method used when designing a new protocol handler or modifying an existing protocol handler.

getContent ()

The getContent() method is used for business object processing. It does the following:

Syntax

public abstract Object getContent (Object input, String mimeType, 
String BOprefix,Long ServerTimeoutStringCredentials) throws IOException

Parameters

input
Specifies the business object interface (the business object to send)

mimeType
Specifies the MIME type of the data being passed to the data handler

BOprefix
Specifies the BOPrefix of the data being passed to the data handler

Long ServerTimeout
Specifies the amount of time the server waits before timing out

Credentials
Authentication credentials

Return values

Returns a business object interface

Calling the WebSphere Business Integration Adapter-provided protocol handler

The following code example illustrates how to call the WebSphere Business Integration Adapter-provided protocol handler.

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, Long ServerTimeout, Credentials);
 
}
catch (Exception XX)
{
//flag error
}

Copyright IBM Corp. 1997, 2004