public class LocalConnector extends AbstractConnector
Modifier and Type | Class and Description |
---|---|
class |
LocalConnector.LocalEndPoint |
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
Container.InheritedListener, Container.Listener
LOG
Constructor and Description |
---|
LocalConnector(Server server) |
LocalConnector(Server server,
ConnectionFactory connectionFactory) |
LocalConnector(Server server,
ConnectionFactory connectionFactory,
SslContextFactory sslContextFactory) |
LocalConnector(Server server,
Executor executor,
Scheduler scheduler,
ByteBufferPool pool,
int acceptors,
ConnectionFactory... factories) |
LocalConnector(Server server,
SslContextFactory sslContextFactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
accept(int acceptorID) |
LocalConnector.LocalEndPoint |
executeRequest(String rawRequest)
Execute a request and return the EndPoint through which
responses can be received.
|
ByteBuffer |
getResponses(ByteBuffer requestsBuffer)
Sends requests and get's responses based on thread activity.
|
ByteBuffer |
getResponses(ByteBuffer requestsBuffer,
long idleFor,
TimeUnit units)
Sends requests and get's responses based on thread activity.
|
String |
getResponses(String requests)
Sends requests and get responses based on thread activity.
|
String |
getResponses(String requests,
long idleFor,
TimeUnit units)
Sends requests and get responses based on thread activity.
|
Object |
getTransport() |
addConnectionFactory, clearConnectionFactories, doStart, doStop, getAcceptorPriorityDelta, getAcceptors, getByteBufferPool, getConnectedEndPoints, getConnectionFactories, getConnectionFactory, getConnectionFactory, getDefaultConnectionFactory, getDefaultProtocol, getExecutor, getIdleTimeout, getName, getProtocols, getScheduler, getServer, interruptAcceptors, isAccepting, join, join, onEndPointClosed, onEndPointOpened, removeConnectionFactory, setAcceptorPriorityDelta, setConnectionFactories, setDefaultProtocol, setIdleTimeout, setName, shutdown, toString
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public LocalConnector(Server server, Executor executor, Scheduler scheduler, ByteBufferPool pool, int acceptors, ConnectionFactory... factories)
public LocalConnector(Server server)
public LocalConnector(Server server, SslContextFactory sslContextFactory)
public LocalConnector(Server server, ConnectionFactory connectionFactory)
public LocalConnector(Server server, ConnectionFactory connectionFactory, SslContextFactory sslContextFactory)
public Object getTransport()
public String getResponses(String requests) throws Exception
This methods waits until the connection is closed or is idle for 1s before returning the responses.
requests
- the requestsException
- if the requests failpublic String getResponses(String requests, long idleFor, TimeUnit units) throws Exception
This methods waits until the connection is closed or an idle period before returning the responses.
requests
- the requestsidleFor
- The time the response stream must be idle for before returningunits
- The units of idleForException
- if the requests failpublic ByteBuffer getResponses(ByteBuffer requestsBuffer) throws Exception
This methods waits until the connection is closed or is idle for 1s before returning the responses.
requestsBuffer
- the requestsException
- if the requests failpublic ByteBuffer getResponses(ByteBuffer requestsBuffer, long idleFor, TimeUnit units) throws Exception
This methods waits until the connection is closed or an idle period before returning the responses.
requestsBuffer
- the requestsidleFor
- The time the response stream must be idle for before returningunits
- The units of idleForException
- if the requests failpublic LocalConnector.LocalEndPoint executeRequest(String rawRequest)
rawRequest
- the requestprotected void accept(int acceptorID) throws IOException, InterruptedException
accept
in class AbstractConnector
IOException
InterruptedException
Copyright © 1995-2015 Webtide. All Rights Reserved.