Package deltix.util.vsocket
Class VSServerFramework
- java.lang.Object
-
- deltix.util.vsocket.VSServerFramework
-
- All Implemented Interfaces:
deltix.util.lang.DisposableListener<VSDispatcher>
,deltix.util.tomcat.ConnectionHandshakeHandler
,java.io.Closeable
,java.lang.AutoCloseable
public class VSServerFramework extends java.lang.Object implements deltix.util.tomcat.ConnectionHandshakeHandler, deltix.util.lang.DisposableListener<VSDispatcher>, java.io.Closeable
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Comparator<VSDispatcher>
comparator
static VSServerFramework
INSTANCE
static int
MAX_CONNECTIONS
static short
MAX_SOCKETS_PER_CONNECTION
-
Constructor Summary
Constructors Constructor Description VSServerFramework(deltix.util.concurrent.QuickExecutor executor, int reconnectInterval, VSCompression compression, int connectionsLimit, short socketsPerConnection, ContextContainer contextContainer)
VSServerFramework(deltix.util.concurrent.QuickExecutor executor, int reconnectInterval, VSCompression compression, ContextContainer contextContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
disposed(VSDispatcher resource)
VSCompression
getCompression()
VSDispatcher
getDispatcher(java.lang.String id)
VSDispatcher[]
getDispatchers()
int
getDispatchersCount()
deltix.util.concurrent.QuickExecutor
getExecutor()
long
getThroughput()
boolean
handleHandshake(Connection c)
Handle the initial transport-level handshake with a client.boolean
handleHandshake(java.net.Socket s)
boolean
handleHandshake(java.net.Socket s, java.io.BufferedInputStream is, java.io.OutputStream os)
Handles inbound HTTP connection handshake when TB is running inside Tomcatvoid
initSSLSocketFactory(TLSContext context)
void
initTransport(TransportProperties transportProperties)
void
setConnectionListener(VSConnectionListener lnr)
-
-
-
Field Detail
-
INSTANCE
public static volatile VSServerFramework INSTANCE
-
MAX_CONNECTIONS
public static final int MAX_CONNECTIONS
- See Also:
- Constant Field Values
-
MAX_SOCKETS_PER_CONNECTION
public static final short MAX_SOCKETS_PER_CONNECTION
- See Also:
- Constant Field Values
-
comparator
public static final java.util.Comparator<VSDispatcher> comparator
-
-
Constructor Detail
-
VSServerFramework
public VSServerFramework(deltix.util.concurrent.QuickExecutor executor, int reconnectInterval, VSCompression compression, int connectionsLimit, short socketsPerConnection, ContextContainer contextContainer)
-
VSServerFramework
public VSServerFramework(deltix.util.concurrent.QuickExecutor executor, int reconnectInterval, VSCompression compression, ContextContainer contextContainer)
-
-
Method Detail
-
getExecutor
public deltix.util.concurrent.QuickExecutor getExecutor()
-
getDispatchers
public VSDispatcher[] getDispatchers()
-
getDispatchersCount
public int getDispatchersCount()
-
getDispatcher
public VSDispatcher getDispatcher(java.lang.String id)
-
getThroughput
public long getThroughput()
-
setConnectionListener
public void setConnectionListener(VSConnectionListener lnr)
-
initSSLSocketFactory
public void initSSLSocketFactory(TLSContext context)
-
initTransport
public void initTransport(TransportProperties transportProperties)
-
handleHandshake
public boolean handleHandshake(java.net.Socket s) throws java.io.IOException
- Throws:
java.io.IOException
-
handleHandshake
public boolean handleHandshake(java.net.Socket s, java.io.BufferedInputStream is, java.io.OutputStream os) throws java.io.IOException
Handles inbound HTTP connection handshake when TB is running inside Tomcat- Specified by:
handleHandshake
in interfacedeltix.util.tomcat.ConnectionHandshakeHandler
- Throws:
java.io.IOException
-
handleHandshake
public boolean handleHandshake(Connection c) throws java.io.IOException
Handle the initial transport-level handshake with a client.- Parameters:
c
- Socket to perform the handshake with.- Returns:
- true if the connection is accepted and socket added to the set of transport channels. false if socket should be closed.
- Throws:
java.io.IOException
-
getCompression
public VSCompression getCompression()
-
disposed
public void disposed(VSDispatcher resource)
- Specified by:
disposed
in interfacedeltix.util.lang.DisposableListener<VSDispatcher>
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-