Developer

PluginInterface Interface

If you develop a custom state by extending the SmappStatePlugin class, it implements the PluginInterface interface.

Plug-in components must have at least one class that implements the PluginInterface. Components that implement PluginInterface are automatically loaded into the messaging server and started. During start-up, the server calls the startup method of the implementing class, which allows the class to perform any necessary setup.

PluginInterface methods are:
  • getInstanceName():String
  • setInstanceName(String):void
  • getRevisedString():String
  • shutdown():void
  • startup(HashMap<String,String>):void

The shutdown method is called when the server is shutting down, giving the implementation a chance to perform housecleaning, such as persisting cache data.

getInstanceName, setInstanceName, and getRevisedString are placeholders only. The component must implement the appropriate functionality.

StatePlugin and ChannelPlugin implementations extend PluginInterface and define their specific interfaces. You can use StatePlugin APIs to develop custom states. The ChannelPlugin interface is reserved for SAP internal development only.


PluginInterface Interface