IBM WebSphere Adapters Network Card User Manual


 
public TwineBallMetadataDiscovery() throws MetadataException {
super("com.ibm.j2ca.sample.twineball.emd");
}
The WBIAdapterTypeImpl constructor requires the following parameters:
1. The name of the class representing the ResourceAdapter class.
This is used to create property groups for ResourceAdapter in enterprise
metadata discovery.
2. Number of outbound connections
3. Number of inbound connections
getAdapterTypeSummaries
Set supportedInMetadataService to true for connections that you want WebSphere
Integration Developer to display when performing enterprise metadata discovery.
Add the connections to adapterType using the add<Inbound/
Outbound>ConnectionType() method:
public AdapterTypeSummary[] getAdapterTypeSummaries() throws MetadataException {
super.getLogUtils().trace(Level.FINEST, CLASSNAME, "getAdapterTypeSummaries",
"Enter Method");
adapterType = new TwineBallAdapterType();
return new WBIAdapterTypeImpl[] { adapterType };
}
getAdapterType
This method returns the instance of adapterType for a given ID. If the enterprise
metadata discovery implementation supports only one adapterType, then it returns
either that ID or the input ID.
getMetadatatree
This method returns an instance of the WBIMetadataTreeImpl implementation. Each
enterprise metadata discovery implementation extends the WBIMetadataTreeImpl
class and an instance of that class is returned from this method.
public MetadataTree getMetadataTree(MetadataConnection conn)
throws MetadataException {
this.connection = (WBIMetadataConnectionImpl) conn;
this.connType = (WBIOutboundConnectionTypeImpl)connection.getConnectionType();
tree = new TwineBallMetadataTree(connection, super.getLogUtils());
tree.setSelectionStyle(MetadataTree.MULTI_SELECT);
return tree;
}
createServiceDescription
This class returns an instance of the inbound or outbound service description,
depending on which input selection is set.
Tip: You might usefully iterate through import configurations in the
MetadataSelection set and then use the properties specified on MetadataSelection
to complete the service description.
The instance of ServiceDescription created should be filled in with name,
namespace, function description and configurations as shown below. The method
copyPropertyValues(), defined on connection configurations, copies the properties
that match between the connection configuration that was used to perform
140 WebSphere Adapters: WebSphere Adapter Toolkit User Guide