public class SocketConnector extends AbstractConnector
Modifier and Type | Class and Description |
---|---|
protected class |
SocketConnector.ConnectorEndPoint |
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<EndPoint> |
_connections |
protected int |
_localPort |
protected java.net.ServerSocket |
_serverSocket |
_buffers, _lowResourceMaxIdleTime, _maxIdleTime, _soLingerTime
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
Constructor and Description |
---|
SocketConnector()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(int acceptorID) |
void |
close() |
void |
customize(EndPoint endpoint,
Request request)
Customize a request for an endpoint.
|
protected void |
doStart()
Start the managed lifecycle beans in the order they were added.
|
protected void |
doStop()
Stop the joined lifecycle beans in the reverse order they were added.
|
void |
dump(java.lang.Appendable out,
java.lang.String indent) |
java.lang.Object |
getConnection() |
int |
getLocalPort() |
protected Connection |
newConnection(EndPoint endpoint)
Allows subclass to override Conection if required.
|
protected java.net.ServerSocket |
newServerSocket(java.lang.String host,
int port,
int backlog) |
void |
open()
Opens the connector
|
checkForwardedHeaders, configure, connectionClosed, connectionOpened, connectionUpgraded, getAcceptorPriorityOffset, getAcceptors, getAcceptQueueSize, getConfidentialPort, getConfidentialScheme, getConnections, getConnectionsDurationMax, getConnectionsDurationMean, getConnectionsDurationStdDev, getConnectionsDurationTotal, getConnectionsOpen, getConnectionsOpenMax, getConnectionsRequestsMax, getConnectionsRequestsMean, getConnectionsRequestsStdDev, getForwardedCipherSuiteHeader, getForwardedForHeader, getForwardedHostHeader, getForwardedProtoHeader, getForwardedServerHeader, getForwardedSslSessionIdHeader, getHost, getHostHeader, getIntegralPort, getIntegralScheme, getLeftMostFieldValue, getLowResourceMaxIdleTime, getLowResourcesMaxIdleTime, getMaxBuffers, getMaxIdleTime, getName, getPort, getRequestBuffers, getRequestBufferSize, getRequestBufferType, getRequestHeaderSize, getRequestHeaderType, getRequests, getResolveNames, getResponseBuffers, getResponseBufferSize, getResponseBufferType, getResponseHeaderSize, getResponseHeaderType, getReuseAddress, getServer, getSoLingerTime, getStatsOn, getStatsOnMs, getThreadPool, isConfidential, isForwarded, isIntegral, isLowResources, join, persist, setAcceptorPriorityOffset, setAcceptors, setAcceptQueueSize, setConfidentialPort, setConfidentialScheme, setForwarded, setForwardedCipherSuiteHeader, setForwardedForHeader, setForwardedHostHeader, setForwardedProtoHeader, setForwardedServerHeader, setForwardedSslSessionIdHeader, setHost, setHostHeader, setIntegralPort, setIntegralScheme, setLowResourceMaxIdleTime, setLowResourcesMaxIdleTime, setMaxBuffers, setMaxIdleTime, setName, setPort, setRequestBuffers, setRequestBufferSize, setRequestHeaderSize, setResolveNames, setResponseBuffers, setResponseBufferSize, setResponseHeaderSize, setReuseAddress, setServer, setSoLingerTime, setStatsOn, setThreadPool, statsReset, stopAccept, toString
addBean, addBean, contains, destroy, dump, dump, dump, dump, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanage
addLifeCycleListener, getState, getState, 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
protected java.net.ServerSocket _serverSocket
protected final java.util.Set<EndPoint> _connections
protected volatile int _localPort
public java.lang.Object getConnection()
public void open() throws java.io.IOException
Connector
java.io.IOException
protected java.net.ServerSocket newServerSocket(java.lang.String host, int port, int backlog) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public void accept(int acceptorID) throws java.io.IOException, java.lang.InterruptedException
accept
in class AbstractConnector
java.io.IOException
java.lang.InterruptedException
protected Connection newConnection(EndPoint endpoint)
public void customize(EndPoint endpoint, Request request) throws java.io.IOException
Connector
customize
in interface Connector
customize
in class AbstractConnector
java.io.IOException
public int getLocalPort()
protected void doStart() throws java.lang.Exception
AggregateLifeCycle
doStart
in class AbstractConnector
java.lang.Exception
AbstractLifeCycle.doStart()
protected void doStop() throws java.lang.Exception
AggregateLifeCycle
doStop
in class AbstractConnector
java.lang.Exception
AbstractLifeCycle.doStart()
public void dump(java.lang.Appendable out, java.lang.String indent) throws java.io.IOException
dump
in interface Dumpable
dump
in class AggregateLifeCycle
java.io.IOException
Copyright © 2013. All Rights Reserved.