public class AsyncWinsockCIFSRequestHandler extends RequestHandler implements Runnable
Handles the receiving of CIFS requests for a number of CIFS sessions.
Constructor and Description |
---|
AsyncWinsockCIFSRequestHandler(NetBIOSName srvName,
int srvLANA,
ThreadRequestPool threadPool,
int maxSess,
int sockTmo)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
protected int |
checkForIdleSessions()
Check for idle sessions
|
void |
closeHandler()
Close the request handler
|
int |
getCurrentSessionCount()
Return the current session count
|
String |
getName()
Return the request handler name
|
int |
getSocketTimeout()
Return the client socket timeout, in milliseconds
|
boolean |
hasFreeSessionSlot()
Check if this request handler has free session slots available
|
void |
queueSessionToHandler(SMBSrvSession sess)
Queue a new session to the request handler, wakeup the request handler thread to register it with the
selector.
|
protected void |
requeueSocketEvent(int sockEvent,
int sockPtr)
Requeue a socket event to the active list
|
void |
run()
Run the main processing in a seperate thread
|
void |
setSocketTimeout(int tmo)
Set the client socket timeout, in milliseconds
|
protected void |
wakeupRequestHandler()
Wakeup the main thread
|
equals, fireRequestHandlerEmptyEvent, getListener, getMaximumSessionCount, hasDebug, hasListener, setDebug, setListener
public AsyncWinsockCIFSRequestHandler(NetBIOSName srvName, int srvLANA, ThreadRequestPool threadPool, int maxSess, int sockTmo)
srvName
- NetBIOSNamesrvLANA
- intthreadPool
- ThreadRequestPoolmaxSess
- intsockTmo
- intpublic final int getCurrentSessionCount()
getCurrentSessionCount
in class RequestHandler
public final boolean hasFreeSessionSlot()
hasFreeSessionSlot
in class RequestHandler
public final int getSocketTimeout()
public final void setSocketTimeout(int tmo)
tmo
- intpublic final void queueSessionToHandler(SMBSrvSession sess)
queueSessionToHandler
in class RequestHandler
sess
- SMBSrvSessionpublic final String getName()
getName
in class RequestHandler
public void run()
public final void closeHandler()
closeHandler
in class RequestHandler
protected final int checkForIdleSessions()
protected void wakeupRequestHandler()
protected void requeueSocketEvent(int sockEvent, int sockPtr)
sockEvent
- intsockPtr
- intCopyright © 2005–2018 Alfresco Software. All rights reserved.