net.sf.xbus.technical.socket
Class SocketSender

java.lang.Object
  extended by net.sf.xbus.technical.socket.SocketSender
All Implemented Interfaces:
Sender, TextSender

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

The SocketSender sends a message to a socket. No response is given back.


Constructor Summary
SocketSender(XBUSSystem destination)
          The constructor stores the destination.
 
Method Summary
 java.lang.String execute(java.lang.String function, java.lang.String callData)
          The given string will be send to the neighbor system.
 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
 

Constructor Detail

SocketSender

public SocketSender(XBUSSystem destination)
The constructor stores the destination.

Parameters:
destination - name of the interface definition
Method Detail

execute

public java.lang.String execute(java.lang.String function,
                                java.lang.String callData)
                         throws XException
Description copied from interface: TextSender
The given string will be send to the neighbor system. The response of the neighbor system is the return value of this method.

Optionally a function can be specified. It can be used for calling different methods of the neighbor-system.

Specified by:
execute in interface TextSender
Parameters:
function - ignored
callData - the data that shall be send to the neighbor system
Returns:
the response of the neighbor system
Throws:
XException - if something goes wrong
See Also:
TextSender.execute(java.lang.String, java.lang.String)

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