程序包 | 说明 |
---|---|
org.apache.mina.transport.socket.apr |
限定符和类型 | 方法和说明 |
---|---|
protected AprSession |
AprSocketAcceptor.accept(IoProcessor<AprSession> processor,
java.lang.Long handle)
Accept a client connection for a server socket and return a new
IoSession
associated with the given IoProcessor |
protected AprSession |
AprSocketConnector.newSession(IoProcessor<AprSession> processor,
java.lang.Long handle)
Create a new
IoSession from a connected socket client handle. |
限定符和类型 | 方法和说明 |
---|---|
protected java.util.Iterator<AprSession> |
AprIoProcessor.allSessions()
|
IoProcessor<AprSession> |
AprSession.getProcessor() |
protected java.util.Iterator<AprSession> |
AprIoProcessor.selectedSessions()
Get an
Iterator for the list of IoSession found selected
by the last call of AbstractPollingIoProcessor.select(long) |
限定符和类型 | 方法和说明 |
---|---|
protected void |
AprIoProcessor.destroy(AprSession session)
Destroy the underlying client socket handle
|
protected SessionState |
AprIoProcessor.getState(AprSession session)
Get the state of a session (One of OPENING, OPEN, CLOSING)
|
protected void |
AprIoProcessor.init(AprSession session) |
protected boolean |
AprIoProcessor.isInterestedInRead(AprSession session)
Tells if this session is registered for reading
|
protected boolean |
AprIoProcessor.isInterestedInWrite(AprSession session)
Tells if this session is registered for writing
|
protected boolean |
AprIoProcessor.isReadable(AprSession session)
Tells if the session ready for reading
|
protected boolean |
AprIoProcessor.isWritable(AprSession session)
Tells if the session ready for writing
|
protected int |
AprIoProcessor.read(AprSession session,
IoBuffer buffer)
|
protected void |
AprIoProcessor.setInterestedInRead(AprSession session,
boolean isInterested)
Set the session to be informed when a read event should be processed
|
protected void |
AprIoProcessor.setInterestedInWrite(AprSession session,
boolean isInterested)
Set the session to be informed when a write event should be processed
|
protected int |
AprIoProcessor.transferFile(AprSession session,
FileRegion region,
int length)
Write a part of a file to a
IoSession , if the underlying API
isn't supporting system calls like sendfile(), you can throw a
UnsupportedOperationException so the file will be send using
usual AbstractPollingIoProcessor.write(AbstractIoSession, IoBuffer, int) call. |
protected int |
AprIoProcessor.write(AprSession session,
IoBuffer buf,
int length)
Write a sequence of bytes to a
IoSession , means to be called when
a session was found ready for writing. |
限定符和类型 | 方法和说明 |
---|---|
protected AprSession |
AprSocketAcceptor.accept(IoProcessor<AprSession> processor,
java.lang.Long handle)
Accept a client connection for a server socket and return a new
IoSession
associated with the given IoProcessor |
protected AprSession |
AprSocketConnector.newSession(IoProcessor<AprSession> processor,
java.lang.Long handle)
Create a new
IoSession from a connected socket client handle. |
构造器和说明 |
---|
AprSocketAcceptor(java.util.concurrent.Executor executor,
IoProcessor<AprSession> processor)
Constructor for
AprSocketAcceptor with a given Executor for handling
connection events and a given AprIoProcessor for handling I/O events, useful for
sharing the same processor and executor over multiple IoService of the same type. |
AprSocketAcceptor(IoProcessor<AprSession> processor)
Constructor for
AprSocketAcceptor with default configuration but a
specific AprIoProcessor , useful for sharing the same processor over multiple
IoService of the same type. |
AprSocketConnector(java.util.concurrent.Executor executor,
IoProcessor<AprSession> processor)
Constructor for
AprSocketConnector with a given Executor for handling
connection events and a given IoProcessor for handling I/O events, useful for sharing
the same processor and executor over multiple IoService of the same type. |
AprSocketConnector(IoProcessor<AprSession> processor)
Constructor for
AprSocketConnector with default configuration but a
specific IoProcessor , useful for sharing the same processor over multiple
IoService of the same type. |