Copyright © TIBCO Software Inc. All Rights Reserved |
In addition to Channels, TIBCO BusinessEvents can also communicate with other data sources using TCP. You can create a local TCP server and a TCP client so that TIBCO BusinessEvents can communicate with data sources not otherwise available through channels, using TCP.TCP communication is available as a Communication Built-in Function in the Catalog Functions view. Using this set of functions you do the following to communicate with TCP servers:
• Create a local TCP server in a startup function using TCP.createLocalServer()
• Register the session listener using TCP.registerSessionListener()
• Start the local server using TCP.startLocalServer()
• Create callback rule functions and register them as callbacks to the TCP listeners. These callback rule functions create events that are sent to an appropriate destination.
TCP.createLocalServer("MyTCPServer", "localhost", System.getGlobalVariableAsInt("NSN/SocketAdaptor/Port", 8055));TCP.registerSessionListener("MyTCPServer", "/RuleFunctions/RawCDRCallback");System.debugOut("Exception occured while initializing TCP server: " + ex@message);
Events.RemoteMsgResponseEvent rulefunction RuleFunctions.RemoteTCPSender {Events.RemoteMsgResponseEvent responseEvent = TCP.readIntoPayloadFully(tcpNickName,
•
• Documentation for functions is provided in the tooltips you can see when browsing the functions in TIBCO BusinessEvents Studio. You can also see this documentation in the TIBCO BusinessEvents Functions Reference, available in the HTML product documentation.
Copyright © TIBCO Software Inc. All Rights Reserved |