156
159
private void sendDownstreamNewEvent( ChannelHandlerContext ctx, ChannelEvent e, EucalyptusMessage reply ) {
157
160
final MappingHttpMessage request = this.requestLocal.get( ctx.getChannel( ) );
159
163
LOG.warn( "Received a null response for request: " + request.getMessageString( ) );
160
164
reply = new EucalyptusErrorMessageType( this.getClass( ).getSimpleName( ), ( EucalyptusMessage ) request.getMessage( ), "Received a NULL reply" );
162
LOG.info( EventRecord.here( Component.eucalyptus, EventType.MSG_SERVICED, reply.getClass( ).getSimpleName( ) ) );
166
LOG.info( EventRecord.here( Component.eucalyptus, EventType.MSG_SERVICED, reply.getClass( ).getSimpleName( ), Long.toString( System.currentTimeMillis( ) - this.startTime.get( ) ) ) );
163
167
final MappingHttpResponse response = new MappingHttpResponse( request.getProtocolVersion( ) );
164
168
final DownstreamMessageEvent newEvent = new DownstreamMessageEvent( ctx.getChannel( ), e.getFuture( ), response, null );
165
169
response.setMessage( reply );
166
170
ctx.sendDownstream( newEvent );