public class MinaSession extends CloseableUtils.AbstractInnerCloseable implements IoSession
CloseableUtils.AbstractCloseable.StatecloseFuture, lock, statelog| 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.
|
org.apache.mina.core.future.WriteFuture |
write(byte[] data,
int offset,
int len) |
doCloseGracefully, doCloseImmediatelybuilder, close, isClosed, isClosing, preCloseclose, isOpenpublic 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()
public org.apache.mina.core.future.WriteFuture write(byte[] data,
int offset,
int len)
protected Closeable getInnerCloseable()
getInnerCloseable in class CloseableUtils.AbstractInnerCloseablepublic IoWriteFuture write(Buffer buffer)
IoSessionwrite in interface IoSessionbuffer - The Buffer with the encoded packet dataIoWriteFuture for the requestpublic IoService getService()
getService in interface IoSessionIoService that created this session.Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.