Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.protocol
Interface ExternalTransportListener


public interface ExternalTransportListener

API for external transport events handling.

All events have to be notified within some transport notification thread. Any events can't be notified by transport inside of calls of ExternalTransport.connect(Endpoint), ExternalTransport.disconnect() or ExternalTransport.sendMessage(Message) or RecursiveCallException will be thrown.


Method Summary
 void onConnected()
          The method is called (using channel's invoker) as soon as the external transport connected to the destination.
 void onDisconnected(java.lang.Throwable cause)
          The method is called (using channel's invoker) as soon as the external transport disconnected from the destination.
 void onMessageReceived(Message message)
          The method is called (using channel's invoker) for each message received by the external transport.
 

Method Detail

onConnected

void onConnected()
The method is called (using channel's invoker) as soon as the external transport connected to the destination.

Throws:
RecursiveCallException - when it is notified inside calls of the methods ExternalTransport.connect(Endpoint), ExternalTransport.disconnect(), ExternalTransport.sendMessage(Message) or ExternalTransport.setTransportListener(ExternalTransportListener)

onDisconnected

void onDisconnected(java.lang.Throwable cause)
The method is called (using channel's invoker) as soon as the external transport disconnected from the destination.

Parameters:
cause - of disconnection. It is null if the disconnection happened due to call of ExternalTransport.disconnect().
Throws:
RecursiveCallException - when it is notified inside calls of the methods ExternalTransport.connect(Endpoint), ExternalTransport.disconnect(), ExternalTransport.sendMessage(Message) or ExternalTransport.setTransportListener(ExternalTransportListener)

onMessageReceived

void onMessageReceived(Message message)
The method is called (using channel's invoker) for each message received by the external transport.

Parameters:
message - that is received by the external transport.
Throws:
RecursiveCallException - when it is notified inside calls of the methods ExternalTransport.connect(Endpoint), ExternalTransport.disconnect(), ExternalTransport.sendMessage(Message) or ExternalTransport.setTransportListener(ExternalTransportListener)

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.