SAP CC 3.0 IEC API

SAP Convergent Charging 3.0 IEC Java/XML API Reference

The IEC API Reference online documentation is intended for programmers that need to implement services provided by IEC (Import/Export Connector), a software component of SAP Convergent Charging (SAP CC) software product.

See:
          Description

Packages
com.highdeal.iec  
com.highdeal.iec.action  
com.highdeal.iec.hci  

 

The IEC API Reference online documentation is intended for programmers that need to implement services provided by IEC (Import/Export Connector), a software component of SAP Convergent Charging (SAP CC) software product.

This document presents how to implement a Java class plugged into the Connector program (or the Connector Server program) of the IEC for adding:

Implementations of the Services

Java APIs

You can implement three Java classes detailed in this section.

Java Class for the Java Action Component

You will develop a Java Action that can be integrated in a Scenario executed by a Connector program. A scenario is created with CAT program.

To implement a Java Action, you have to create:

To compile this task you need the iec.jar file in your Java compiler classpath.

Once developed, you have to declare your Java class (Java Task) in a Scenario by using the CAT and inserting a Java Action Component.

Java Class for the Log Action Component

You will develop a Java class that implements the UserLogger interface. By using a Log Action ComponentScenario, you can configure a Connector program to execute this Java class. A scenario is created with CAT program.

To implement the com.highdeal.iec.UserLogger Java interface, you have to implement its 5 methods: UserLogger.init(), UserLogger.close(), terminated(...), rejected(...) and filtered(...).

To compile this task you need the iec.jar file in your Java compiler classpath.

Once developed, you have to declare your Java class in a Scenario by using the CAT and inserting a Log Action Component.

Java Class for the BART Acquisition Session Component

You will develop a Java class that implements the com.highdeal.bart.iec.AcquisitionSessionReportHandler) interface. By using a BART Acquisition Session ComponentScenario, you can configure a Connector program to execute this Java class. A scenario is created with CAT program.

To compile this task you need the bart-iec.jar file in your Java compiler classpath.

Once developed, you have to declare your Java class in a Scenario by using the CAT and inserting a BART Acquisition Session Component.


Important note: this document does not provide any information about how to implement such a Java class. Please refer to the BART API Reference.

Configuration

With the Connector Administration Tool (CAT), create a Scenario and insert a Java Action Component in it. Configure this component with the details of the Java classe(s) you have developed.

Once compiled, put your development in the classpath of the Connector programs: add your classes or jar in the <IEC_HOME>/jars/ folder.

Note: It is not recommended to modify directly the launch script of the connector program in order to add your directory to the classpath. Prefer the copy of your implementation to the <IEC_HOME>/jars/ folder.


Implementation Tutorial

Implementation Tutorial #1: Java Action

This section describes how to implement a Java Action which can be integrated in a scenario executed by a Connector program. To illustrate this tutorial, let's take an original example which will receive a name from the previous action and will send the string "HELLO "+name to the next action. It can be very funny if name is "WORLD", I let you imagine.

Step 1

To implement a Java Action, you have to create a java class, com.mycompany.iec.Hello, which extends the abstract class JavaTask and implement the following 2 methods: Let's back to our example, we create a class: com.mycompany.iec.Hello

package com.mycompany.iec; import java.util.Properties; import com.highdeal.iec.action.JavaTask; /** * This class generates the message "HELLO+[name]" and * makes it available to the next action. * The mandatory initialization properties are: * <ul> * <li>"nameIKey" : the key which map the property "name" in the DataCollection</li> * <li>"nameOKey" : the key which will map the property "message" in the DataCollection</li> * </ul> */ public class Hello extends JavaTask { public void setProperties(Properties props) throws CannotInitializeException { // Get the key with which the name will be mapped nameIKey = props.getProperty("nameIKey"); // Get the key with which the message "HELLO+name" will be mapped and // available to the next action. msgOKey = props.getProperty("msgOKey"); } public DataCollection execute(DataCollection collection) throws ExecException { // Get the name // The name is extracted from the collection with the key //initialized in the method "getProperties". String name = collection.getString(nameIKey); // Generate the message String msg = "HELLO "+name; // Make the message available to the next action. // The message is mapped with the key initialized in the method // "getProperties". collection.setString(msgOKey, msg); return collection; } // The key with which the name is mapped private String nameIKey; // The key which will map the output message. private String msgOKey; }

Note: To compile this task, you need the iec.jar library in you Java compiler classpath.

Step 2

Having do that, you have to declare your task in a Scenario. Simply create a new Scenario with the CAT and insert a Java Action Component. The next step describes how to configure this component.

Note: If you are interested by the final state of a DataCollection, your JavaTask has to implement the interface JavaTaskStateListener. This interface is the following:

Step 3

Step 4: Execution of the Java Action

Make sure that the Connector program can access to Java classes referenced by the Java Action Component in your Scenario. Execute your new scenario in a connector program:

Implementation Tutorial #2: Log Action

The following example shows you how to implement the UserLogger interface. This example shows the ConsoleLogger class that is used to print each event on a console:

Example

/* * * Copyright (C) 2001 SAP AG All Rights Reserved. * * NOTICE: The information contained in this document is subject to change * without notice. * * SAP AG MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL INCLUDING * BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE. * * SAP AG shall not be liable for errors contained here in or for incidental * or consequential damages in connection with the furnishing, performance or * use of this material. * * This document contains proprietary information which is protected by * copyright. All rights reserved. No part of this document may be photocopied, * reproduced or translated to another language without the prior written * consent of SAP AG. * * */ import com.highdeal.iec.DataCollection; import com.highdeal.iec.UserLogger; public class ConsoleLogger implements UserLogger { public void init() { System.out.println("ConsoleLogger is initialized."); } public void close() { System.out.println("ConsoleLogger is closed."); } public void terminated(DataCollection dc, String actionUid) { System.out.println(dc.getUID()+" is terminated by "+actionUid); } public void rejected(DataCollection dc, String reasonCode, String[] args, String actionUid) { System.out.print(dc.getUID()+" is rejected by "+actionUid+” : "+reasonCode+"{"); int len; if (args!=null && (len=args.length)>0){ System.out.print(args[0]); for (int i=1; i<len; ++i){ System.out.print(", "); System.out.print(args[i]); } } System.out.println('}'); } public void filtered(DataCollection dc, String actionUid) { System.out.println(dc.getUID()+" is filtered by "+actionUid); } }

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:

Other related documents can help you about BART and IEC:

Copyrights and Disclaimer

(c) Copyright 2009 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

Disclaimer

Some components of this product are based on Java. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components.

See Also:
com.highdeal.iec.action.JavaTask (Abstract Class), com.highdeal.iec.UserLogger (Interface)


SAP CC 3.0 IEC API

(c) Copyright 2011 SAP AG. All rights reserved. SAP Convergent Charging 3.0