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 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() |
protected void |
doStop() |
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, 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 ServerSocket _serverSocket
protected volatile int _localPort
public Object getConnection()
public void open() throws IOException
Connector
IOException
protected ServerSocket newServerSocket(String host, int port, int backlog) throws IOException
IOException
public void close() throws IOException
IOException
public void accept(int acceptorID) throws IOException, InterruptedException
accept
in class AbstractConnector
IOException
InterruptedException
protected Connection newConnection(EndPoint endpoint)
public void customize(EndPoint endpoint, Request request) throws IOException
Connector
customize
in interface Connector
customize
in class AbstractConnector
IOException
public int getLocalPort()
protected void doStart() throws Exception
doStart
in class AbstractConnector
Exception
protected void doStop() throws Exception
doStop
in class AbstractConnector
Exception
public void dump(Appendable out, String indent) throws IOException
dump
in interface Dumpable
dump
in class AggregateLifeCycle
IOException
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.