Class SocketProxy
- java.lang.Object
- 
- org.apache.solr.client.solrj.cloud.SocketProxy
 
- 
 public class SocketProxy extends Object Kindly borrowed the idea and base implementation from the ActiveMQ project; useful for blocking traffic on a specified port.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classSocketProxy.AcceptorclassSocketProxy.Bridge
 - 
Field SummaryFields Modifier and Type Field Description static intACCEPT_TIMEOUT_MILLISList<SocketProxy.Bridge>connectionsstatic intPUMP_SOCKET_TIMEOUT_MS
 - 
Constructor SummaryConstructors Constructor Description SocketProxy()SocketProxy(boolean useSSL)SocketProxy(int port, boolean useSSL)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intgetAcceptBacklog()intgetListenPort()URIgetUrl()voidgoOn()voidhalfClose()booleanisPauseAtStart()voidopen(URI uri)voidpause()voidreopen()voidsetAcceptBacklog(int acceptBacklog)voidsetPauseAtStart(boolean pauseAtStart)voidsetReceiveBufferSize(int receiveBufferSize)voidsetTarget(URI tcpBrokerUri)StringtoString()booleanwaitUntilClosed(long timeoutSeconds)
 
- 
- 
- 
Field Detail- 
ACCEPT_TIMEOUT_MILLISpublic static final int ACCEPT_TIMEOUT_MILLIS - See Also:
- Constant Field Values
 
 - 
PUMP_SOCKET_TIMEOUT_MSpublic static final int PUMP_SOCKET_TIMEOUT_MS - See Also:
- Constant Field Values
 
 - 
connectionspublic List<SocketProxy.Bridge> connections 
 
- 
 - 
Method Detail- 
setReceiveBufferSizepublic void setReceiveBufferSize(int receiveBufferSize) 
 - 
setTargetpublic void setTarget(URI tcpBrokerUri) 
 - 
getListenPortpublic int getListenPort() 
 - 
getUrlpublic URI getUrl() 
 - 
closepublic void close() 
 - 
halfClosepublic void halfClose() 
 - 
waitUntilClosedpublic boolean waitUntilClosed(long timeoutSeconds) throws InterruptedException- Throws:
- InterruptedException
 
 - 
reopenpublic void reopen() 
 - 
pausepublic void pause() 
 - 
goOnpublic void goOn() 
 - 
isPauseAtStartpublic boolean isPauseAtStart() 
 - 
setPauseAtStartpublic void setPauseAtStart(boolean pauseAtStart) 
 - 
getAcceptBacklogpublic int getAcceptBacklog() 
 - 
setAcceptBacklogpublic void setAcceptBacklog(int acceptBacklog) 
 
- 
 
-