Class NettyResponderRequestHandlerTask

java.lang.Object
org.serviceconnector.net.res.netty.NettyResponderRequestHandlerTask
All Implemented Interfaces:
IResponderCallback

public class NettyResponderRequestHandlerTask extends Object implements IResponderCallback
The Class NettyResponderRequestHandlerTask. Is responsible for processing a request. It has to be a new thread because of NETTY threading concept. A worker thread owns a channel pipeline. If block the thread nothing will be sent on that channel. More information about this issue: http://www.jboss.org/netty/community.html#nabble-td5441049
  • Constructor Details

    • NettyResponderRequestHandlerTask

      public NettyResponderRequestHandlerTask(IRequest request, IResponse response)
      Instantiates a new netty responder request handler task.
      Parameters:
      request - the request
      response - the response
  • Method Details

    • process

      public void process()
      Process the request.
    • responseCallback

      public void responseCallback(IRequest request, IResponse response)
      Response callback.
      Specified by:
      responseCallback in interface IResponderCallback
      Parameters:
      request - the request
      response - the response
    • sendBadRequestError

      protected void sendBadRequestError(IResponse response, SCMPMessage scmpReq) throws Exception
      Send bad request error.
      Parameters:
      response - the response
      scmpReq - the SCMP request
      Throws:
      Exception - the exception