org.webbitserver.netty
Class AbstractHttpConnection

java.lang.Object
  extended by org.webbitserver.netty.AbstractHttpConnection
All Implemented Interfaces:
Executor, DataHolder, HttpConnection
Direct Known Subclasses:
NettyEventSourceConnection, NettyWebSocketConnection

public abstract class AbstractHttpConnection
extends Object
implements HttpConnection


Constructor Summary
AbstractHttpConnection(org.jboss.netty.channel.ChannelHandlerContext ctx, NettyHttpRequest nettyHttpRequest, Executor executor)
           
 
Method Summary
protected  void closeChannel()
           
 Map<String,Object> data()
          Arbitrary data that can be stored for the lifetime of the connection.
 Object data(String key)
          Retrieve data value by key.
 Set<String> dataKeys()
          List data keys.
 void execute(Runnable command)
           
 Executor handlerExecutor()
           
 NettyHttpRequest httpRequest()
           
protected  void putData(String key, Object value)
           
protected  void writeMessage(Object message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.webbitserver.HttpConnection
close
 
Methods inherited from interface org.webbitserver.DataHolder
data
 

Constructor Detail

AbstractHttpConnection

public AbstractHttpConnection(org.jboss.netty.channel.ChannelHandlerContext ctx,
                              NettyHttpRequest nettyHttpRequest,
                              Executor executor)
Method Detail

writeMessage

protected void writeMessage(Object message)

closeChannel

protected void closeChannel()

putData

protected void putData(String key,
                       Object value)

httpRequest

public NettyHttpRequest httpRequest()
Specified by:
httpRequest in interface HttpConnection

data

public Map<String,Object> data()
Description copied from interface: DataHolder
Arbitrary data that can be stored for the lifetime of the connection.

Specified by:
data in interface DataHolder

data

public Object data(String key)
Description copied from interface: DataHolder
Retrieve data value by key.

Specified by:
data in interface DataHolder
See Also:
DataHolder.data()

dataKeys

public Set<String> dataKeys()
Description copied from interface: DataHolder
List data keys.

Specified by:
dataKeys in interface DataHolder
See Also:
DataHolder.data()

handlerExecutor

public Executor handlerExecutor()
Specified by:
handlerExecutor in interface HttpConnection

execute

public void execute(Runnable command)
Specified by:
execute in interface Executor


Copyright © 2012. All Rights Reserved.