Package deltix.util.vsocket
Class VSDispatcher
- java.lang.Object
-
- deltix.util.vsocket.VSDispatcher
-
- All Implemented Interfaces:
deltix.util.lang.Disposable
,java.io.Closeable
,java.lang.AutoCloseable
public final class VSDispatcher extends java.lang.Object implements deltix.util.lang.Disposable
-
-
Constructor Summary
Constructors Constructor Description VSDispatcher(java.lang.String clientId, boolean isClient, ContextContainer contextContainer)
Constructs a dispatcher instance for the specified client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDisposableListener(deltix.util.lang.DisposableListener listener)
void
addTransportChannel(VSocket socket)
void
checkIn(deltix.util.vsocket.VSTransportChannel tc)
void
close()
void
close(boolean wait)
void
closeTransport()
java.lang.String
getApplicationID()
double
getAverageThroughput()
Return average throughput (bytes per second)java.lang.String
getClientId()
java.util.Date
getCreationDate()
int
getNumTransportChannels()
deltix.util.concurrent.QuickExecutor
getQuickExecutor()
int
getReconnectInterval()
java.lang.String
getRemoteAddress()
long
getThroughput()
Return current peak throughput (bytes per second)VSChannel[]
getVirtualChannels()
boolean
hasAvailableTransport()
boolean
hasTransportChannels()
void
removeDisposableListener(deltix.util.lang.DisposableListener listener)
void
setApplicationID(java.lang.String applicationID)
void
setConnectionListener(VSConnectionListener connectionListener)
void
setLingerInterval(int reconnectInterval)
void
setStateListener(deltix.util.vsocket.ConnectionStateListener stateListener)
java.lang.String
toString()
-
-
-
Constructor Detail
-
VSDispatcher
public VSDispatcher(java.lang.String clientId, boolean isClient, ContextContainer contextContainer)
Constructs a dispatcher instance for the specified client.
-
-
Method Detail
-
getThroughput
public long getThroughput()
Return current peak throughput (bytes per second)- Returns:
- number of bytes per second
-
getAverageThroughput
public double getAverageThroughput()
Return average throughput (bytes per second)- Returns:
- number of bytes per second
-
getReconnectInterval
public int getReconnectInterval()
-
getApplicationID
public java.lang.String getApplicationID()
-
setApplicationID
public void setApplicationID(java.lang.String applicationID)
-
setLingerInterval
public void setLingerInterval(int reconnectInterval)
-
getClientId
public java.lang.String getClientId()
-
getCreationDate
public java.util.Date getCreationDate()
-
getNumTransportChannels
public int getNumTransportChannels()
-
hasTransportChannels
public boolean hasTransportChannels()
-
hasAvailableTransport
public boolean hasAvailableTransport()
-
addTransportChannel
public void addTransportChannel(VSocket socket) throws java.io.IOException
- Throws:
java.io.IOException
-
setConnectionListener
public void setConnectionListener(VSConnectionListener connectionListener)
-
setStateListener
public void setStateListener(deltix.util.vsocket.ConnectionStateListener stateListener)
-
closeTransport
public void closeTransport() throws java.io.IOException, java.lang.InterruptedException
- Throws:
java.io.IOException
java.lang.InterruptedException
-
checkIn
public void checkIn(deltix.util.vsocket.VSTransportChannel tc)
-
close
public void close(boolean wait)
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfacedeltix.util.lang.Disposable
-
getVirtualChannels
public VSChannel[] getVirtualChannels()
-
getRemoteAddress
public java.lang.String getRemoteAddress()
-
addDisposableListener
public void addDisposableListener(deltix.util.lang.DisposableListener listener)
-
removeDisposableListener
public void removeDisposableListener(deltix.util.lang.DisposableListener listener)
-
getQuickExecutor
public deltix.util.concurrent.QuickExecutor getQuickExecutor()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-