Example usage for org.springframework.integration.ip.tcp.connection TcpConnectionEvent getSource

List of usage examples for org.springframework.integration.ip.tcp.connection TcpConnectionEvent getSource

Introduction

In this page you can find the example usage for org.springframework.integration.ip.tcp.connection TcpConnectionEvent getSource.

Prototype

public Object getSource() 

Source Link

Document

The object on which the Event initially occurred.

Usage

From source file:ru.jts_dev.gameserver.service.GameSessionService.java

@Order(Ordered.HIGHEST_PRECEDENCE)
@EventListener/*w  ww .  jav a  2  s. c  o  m*/
private void tcpConnectionEventListener(TcpConnectionEvent event) {
    sessions.put(event.getConnectionId(), createSession((TcpConnection) event.getSource()));
}

From source file:org.springframework.integration.ip.tcp.connection.TcpConnectionSupport.java

/**
 * Allow interceptors etc to publish events, perhaps subclasses of
 * TcpConnectionEvent. The event source must be this connection.
 * @param event the event to publish./*w  w w .j  a va  2 s. c  om*/
 */
public void publishEvent(TcpConnectionEvent event) {
    Assert.isTrue(event.getSource() == this, "Can only publish events with this as the source");
    this.doPublish(event);
}