public class SocketConnector extends AbstractConnector
| Modifier and Type | Class and Description |
|---|---|
protected class |
SocketConnector.ConnectorEndPoint |
AbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.Listener| Modifier and Type | Field and Description |
|---|---|
protected Set<EndPoint> |
_connections |
protected int |
_localPort |
protected 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(Appendable out,
String indent) |
Object |
getConnection() |
int |
getLocalPort() |
protected Connection |
newConnection(EndPoint endpoint)
Allows subclass to override Conection if required.
|
protected ServerSocket |
newServerSocket(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, toStringaddBean, addBean, contains, destroy, dump, dump, dump, dump, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanageaddLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopprotected ServerSocket _serverSocket
protected volatile int _localPort
public Object getConnection()
public void open()
throws IOException
ConnectorIOExceptionprotected ServerSocket newServerSocket(String host, int port, int backlog) throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic void accept(int acceptorID)
throws IOException,
InterruptedException
accept in class AbstractConnectorIOExceptionInterruptedExceptionprotected Connection newConnection(EndPoint endpoint)
public void customize(EndPoint endpoint, Request request) throws IOException
Connectorcustomize in interface Connectorcustomize in class AbstractConnectorIOExceptionpublic int getLocalPort()
protected void doStart()
throws Exception
AggregateLifeCycledoStart in class AbstractConnectorExceptionAbstractLifeCycle.doStart()protected void doStop()
throws Exception
AggregateLifeCycledoStop in class AbstractConnectorExceptionAbstractLifeCycle.doStart()public void dump(Appendable out, String indent) throws IOException
dump in interface Dumpabledump in class AggregateLifeCycleIOExceptionCopyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.