public abstract class TcpConnectionSupport extends ObjectSE implements TcpConnection
| コンストラクターと説明 |
|---|
TcpConnectionSupport() |
TcpConnectionSupport(ApplicationEventPublisher applicationEventPublisher) |
TcpConnectionSupport(SocketSE socket, boolean server, boolean lookupHost, ApplicationEventPublisher applicationEventPublisher, StringSE connectionFactoryName) イベントパブリッシャーが提供されている場合、 TcpConnectionSupport オブジェクトを作成し、TcpConnectionOpenEvent をパブリッシュします。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSEgetDeserializerStateKey, getPayload, getPort, getSslSession, isOpen, send, shutdownInput, shutdownOutputrunSEprotected final Log logger
public TcpConnectionSupport()
public TcpConnectionSupport(@Nullable ApplicationEventPublisher applicationEventPublisher)
public TcpConnectionSupport(SocketSE socket, boolean server, boolean lookupHost, @Nullable ApplicationEventPublisher applicationEventPublisher, @Nullable StringSE connectionFactoryName)
TcpConnectionSupport オブジェクトを作成し、TcpConnectionOpenEvent をパブリッシュします。socket - 基本となるソケット。server - この接続がサーバー接続の場合は truelookupHost - ホスト名の逆ルックアップを実行する必要がある場合は true、それ以外の場合は、識別のために IP アドレスが使用されます。applicationEventPublisher - オープン、クローズ、例外イベントが送信されるパブリッシャー。イベントの公開が不要な場合は null になることがあります。connectionFactoryName - この接続を作成する接続ファクトリの名前。イベントの発行中に使用され、null の場合があります。その場合、「不明」が使用されます。public void close()
TcpConnection の close protected void closeConnection(boolean isException)
isException - この呼び出しが例外の結果である場合は true。public TcpMessageMapper getMapper()
public void setMapper(TcpMessageMapper mapper)
mapper - 設定するマッパー public Deserializer<?> getDeserializer()
TcpConnection の getDeserializer public void setDeserializer(Deserializer<?> deserializer)
deserializer - 設定するデシリアライザー public Serializer<?> getSerializer()
TcpConnection の getSerializer public void setSerializer(Serializer<?> serializer)
serializer - 設定するシリアライザー public void setNeedsTest(boolean needsTest)
needsTest - 一時リスナーの場合は true。public void registerListener(@Nullable TcpListener listener)
listener - リスナー。public void registerTestListener(TcpListener tListener)
tListener - テストリスナー。public void enableManualListenerRegistration()
TcpListener の自動登録または手動登録を使用するかどうかを設定します。(デフォルトは自動)。手動登録が行われている場合、受信メッセージはリスナーが登録されるまで遅延されます。public void registerSender(@Nullable TcpSender senderToRegister)
senderToRegister - 送り主。public void registerSenders(ListSE<TcpSender> sendersToRegister)
sendersToRegister - 送り主。public TcpListener getListener()
TcpConnection の getListener public boolean isServer()
TcpConnection の isServer public long incrementAndGetConnectionSequence()
TcpConnection の incrementAndGetConnectionSequence public StringSE getHostAddress()
TcpConnection の getHostAddress public StringSE getHostName()
TcpConnection の getHostName public StringSE getConnectionId()
TcpConnection の getConnectionId public SocketInfo getSocketInfo()
TcpConnectionSocketSE プロパティに getter を提供します。TcpConnection の getSocketInfo public StringSE getConnectionFactoryName()
protected boolean isNoReadErrorOnClose()
protected void setNoReadErrorOnClose(boolean noReadErrorOnClose)
protected final void sendExceptionToListener(ExceptionSE e)
protected void publishConnectionOpenEvent()
protected void publishConnectionCloseEvent()
protected void publishConnectionExceptionEvent(ThrowableSE t)
public void publishEvent(TcpConnectionEvent event)
event - 公開するイベント。public StringSE toString()
ObjectSE の toStringSE