com.genesyslab.omsdk.mil
Interface MILESPExtension


public interface MILESPExtension

Represents an ESP (External Service Protocol) extension.

To benefit from the ESP feature, create a ServiceName class that implements this interface. To process ESP requests, add a methodName method to your ServiceName class, as shown in the following code snippet:

package com.genesyslab.examples.mil.extensions;
public class ServiceName implements ESPExtension
{
    public ServiceName(){
      //keep empty     }
    public void initialize(){
      //Implement initialization
      //...
    }
    public void shutdown(){
      //Implement release
      //...
    }
    //Name this method as you wish
    public void methodName(MILESPRequest request){
      //Managing the request
      //...
    }
}

To use this extension, define an ESP strategy in the Interaction Routing Designer and create an External Service. In the External Service Property box, specify the fully qualified name of the service (for example com.genesyslab.examples.mil.extensions.ServiceName), and the methodName method to call during the script execution.

To preload extensions at startup, add your ESPExtension classes to the preloaded list extension in the MILInitializationParameters instance used to initialize the MILFactory.

When, for the first time, MIL receives a MILESPRequest for this extension, or if the extension belongs to the preloaded extension list, MIL creates a MILESPExtension object using its default constructor. This default constructor has no argument and remains empty. MIL initializes the object by calling the implemented initialize() method.

If MIL releases, it calls the shutdown() method on all the loaded extensions.

Since:
7.1.007.00

Method Summary
 void initialize()
          Initializes the extension.
 void shutdown()
          Releases this ESP extension.
 

Method Detail

initialize

public void initialize()
                throws MILESPExtensionException
Initializes the extension.

Throws:
MILESPExtensionException

shutdown

public void shutdown()
Releases this ESP extension.