public class MinaSession extends AbstractInnerCloseable implements IoSession
| Modifier and Type | Class and Description |
|---|---|
static class |
MinaSession.Future |
AbstractCloseable.StatecloseFuture, lock, statelogCLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT| Constructor and Description |
|---|
MinaSession(MinaService service,
org.apache.mina.core.session.IoSession session) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(Object key)
Returns the value of the user-defined attribute of this session.
|
long |
getId() |
protected Closeable |
getInnerCloseable() |
SocketAddress |
getLocalAddress() |
SocketAddress |
getRemoteAddress() |
IoService |
getService() |
org.apache.mina.core.session.IoSession |
getSession() |
Object |
setAttribute(Object key,
Object value)
Sets a user-defined attribute.
|
void |
suspend() |
String |
toString() |
IoWriteFuture |
write(Buffer buffer)
Write a packet on the socket.
|
IoWriteFuture |
write(byte[] data) |
IoWriteFuture |
write(byte[] data,
int offset,
int len) |
IoWriteFuture |
write(org.apache.mina.core.buffer.IoBuffer buffer) |
doCloseGracefully, doCloseImmediatelyaddCloseFutureListener, builder, close, isClosed, isClosing, preClose, removeCloseFutureListenergetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCloseFutureListener, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerpublic MinaSession(MinaService service, org.apache.mina.core.session.IoSession session)
public org.apache.mina.core.session.IoSession getSession()
public void suspend()
public Object getAttribute(Object key)
IoSessiongetAttribute in interface IoSessionkey - the key of the attributepublic Object setAttribute(Object key, Object value)
IoSessionsetAttribute in interface IoSessionkey - the key of the attributevalue - the value of the attributepublic SocketAddress getRemoteAddress()
getRemoteAddress in interface IoSessionpublic SocketAddress getLocalAddress()
getLocalAddress in interface IoSessionpublic long getId()
protected Closeable getInnerCloseable()
getInnerCloseable in class AbstractInnerCloseablepublic IoWriteFuture write(byte[] data)
public IoWriteFuture write(byte[] data, int offset, int len)
public IoWriteFuture write(Buffer buffer)
IoSessionwrite in interface IoSessionbuffer - The Buffer with the encoded packet dataIoWriteFuture for the requestpublic IoWriteFuture write(org.apache.mina.core.buffer.IoBuffer buffer)
public IoService getService()
getService in interface IoSessionIoService that created this session.Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.