net.sf.xbus.technical.misc
Class ProgramSender
java.lang.Object
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.
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 |
mDestination
protected XBUSSystem mDestination
ProgramSender
public ProgramSender(XBUSSystem destination)
- Stores the destination.
- Parameters:
destination
- name of the interface definition
- Throws:
XException
- never
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
- ignoredcallData
- 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:
getType
returns Constants.TYPE_TEXT
- The class implements the interface
TextSender
When working with Objects
the Sender must also fulfill two
preconditions:
getType
returns Constants.TYPE_OBJECT
- The class implements the interface
ObjectSender
- Specified by:
getType
in interface Sender