com.highdeal.iec
Interface UserLogger


public interface UserLogger

This Java interface defines the necessary methods invoked by the Import/Export Connector (IEC) application when processing a Log Action component configured in the executed scenario; You develop a Java class implementing this interface to customize the behavior of the IEC application in your SAP CC system landscape.

Implementation in Your IEC Application

When you need to add and customize a Log Action component in a scenario configured with the CAT Tool user interface of SAP Convergent Charging, you develop a Java class that implements the functions expected by your business requirements.

Design and develop the behavior of the methods invoked by the running IEC application when starting, processing a Log Action component configured in the exectued scenario:

Note

If you want that the running IEC application is able to initialize some properties, make sure you extend your customized Java class with the JavaTask abstract class.

Design and develop the JavaTask.setProperties(..) method.

Customizing Sequence

Your customized Java class must implement this UserLogger Java interface. To implement this interface, you develop its five methods depending on your business requirements:

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

Once developed, you specify your Java class in the relevant customized scenario and component: Set up a Log Action component with CAT Tool.

Code Snippet

Refer to the tutorial: Implementing a console logger

This example shows you how to develop a class that implements the UserLogger interface. The example defines the ConsoleLogger class that is used to print each event on a console.

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); } }

See Also:
DataCollection, JavaTask

Method Summary
 void close()
          Invoked by a running IEC application when the execution of the UserLogger is complete.
 void filtered(DataCollection dc, java.lang.String reasonCode, java.lang.String[] args, java.lang.String actionUid)
          Invoked by an action when the processing of the data collection is complete and filtered.
 void init()
          Invoked by a running IEC application to initialize the UserLogger at the time of its creation.
 void rejected(DataCollection dc, java.lang.String reasonCode, java.lang.String[] args, java.lang.String actionUid)
          Invoked by an action when the processing of the data collection is complete but failed.
 void terminated(DataCollection dc, java.lang.String actionUid)
          Invoked by an action when the processing of the data collection is complete and successful.
 

Method Detail

init

void init()
Invoked by a running IEC application to initialize the UserLogger at the time of its creation.


close

void close()
Invoked by a running IEC application when the execution of the UserLogger is complete.


terminated

void terminated(DataCollection dc,
                java.lang.String actionUid)
Invoked by an action when the processing of the data collection is complete and successful.

Parameters:
dc - The data collection
actionUid - The ID of the action

rejected

void rejected(DataCollection dc,
              java.lang.String reasonCode,
              java.lang.String[] args,
              java.lang.String actionUid)
Invoked by an action when the processing of the data collection is complete but failed. Two parameters specify more details about the failure: the reason code and the array of parameters related to the reason code.

Parameters:
dc - The data collection
reasonCode - The reason code of the rejection
args - The parameter array relating to the reason code
actionUid - The ID of the action

filtered

void filtered(DataCollection dc,
              java.lang.String reasonCode,
              java.lang.String[] args,
              java.lang.String actionUid)
Invoked by an action when the processing of the data collection is complete and filtered.

Parameters:
dc - The data collection
reasonCode - The reason code of the filtering
args - The parameter array relating to the reason code
actionUid - The ID of the action

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)