Methods Summary |
---|
private void | dprint(java.lang.String msg)
ORBUtility.dprint("EventHandlerBase", msg);
|
public java.nio.channels.SelectionKey | getSelectionKey()
return selectionKey;
|
public com.sun.corba.se.spi.orbutil.threadpool.Work | getWork()
return work;
|
public void | handleEvent()
if (orb.transportDebugFlag) {
dprint(".handleEvent->: " + this);
}
getSelectionKey().interestOps(getSelectionKey().interestOps() &
(~ getInterestOps()));
if (shouldUseWorkerThreadForEvent()) {
Throwable throwable = null;
try {
if (orb.transportDebugFlag) {
dprint(".handleEvent: addWork to pool: " + 0);
}
orb.getThreadPoolManager().getThreadPool(0)
.getWorkQueue(0).addWork(getWork());
} catch (NoSuchThreadPoolException e) {
throwable = e;
} catch (NoSuchWorkQueueException e) {
throwable = e;
}
// REVISIT: need to close connection.
if (throwable != null) {
if (orb.transportDebugFlag) {
dprint(".handleEvent: " + throwable);
}
INTERNAL i = new INTERNAL("NoSuchThreadPoolException");
i.initCause(throwable);
throw i;
}
} else {
if (orb.transportDebugFlag) {
dprint(".handleEvent: doWork");
}
getWork().doWork();
}
if (orb.transportDebugFlag) {
dprint(".handleEvent<-: " + this);
}
|
public void | setSelectionKey(java.nio.channels.SelectionKey selectionKey)
this.selectionKey = selectionKey;
|
public void | setUseSelectThreadToWait(boolean x)
useSelectThreadToWait = x;
|
public void | setUseWorkerThreadForEvent(boolean x)
useWorkerThreadForEvent = x;
|
public void | setWork(com.sun.corba.se.spi.orbutil.threadpool.Work work)
this.work = work;
|
public boolean | shouldUseSelectThreadToWait()
return useSelectThreadToWait;
|
public boolean | shouldUseWorkerThreadForEvent()
return useWorkerThreadForEvent;
|