net.sf.xbus.technical.misc
Class ProgramSender

java.lang.Object
  extended by net.sf.xbus.technical.misc.ProgramSender
All Implemented Interfaces:
Sender, TextSender
Direct Known Subclasses:
SimpleProgramSender

public class ProgramSender
extends java.lang.Object
implements Sender, TextSender

ProgramSender calls an external program. Program name and parameters are read out of the configuration.


Field Summary
protected  XBUSSystem mDestination
           
 
Constructor Summary
ProgramSender(XBUSSystem destination)
          Stores the destination.
 
Method Summary
 java.lang.String execute(java.lang.String function, java.lang.String callData)
          Calls an external program.
 java.lang.String getType()
          A Sender can send data either as a String or as an Object to the neighboring system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mDestination

protected XBUSSystem mDestination
Constructor Detail

ProgramSender

public ProgramSender(XBUSSystem destination)
Stores the destination.

Parameters:
destination - name of the interface definition
Throws:
XException - never
Method Detail

execute

public java.lang.String execute(java.lang.String function,
                                java.lang.String callData)
                         throws XException
Calls an external program. Program name and parameters are read out of the configuration.

Specified by:
execute in interface TextSender
Parameters:
function - ignored
callData - ignored
Returns:
the response of the neighbor system
Throws:
XException - if something goes wrong

getType

public java.lang.String getType()
Description copied from interface: Sender
A Sender can send data either as a String or as an Object to the neighboring system.
When working with Strings the Sender must fulfill two preconditions: When working with Objects the Sender must also fulfill two preconditions:

Specified by:
getType in interface Sender