class ProtectedExecutionHandler extends ExecutionHandler {
	private ThreadPoolExecutor threadPoolExecutor;

	ProtectedExecutionHandler(final ThreadPoolExecutor threadPoolExecutor) {
		super(threadPoolExecutor);
		this.threadPoolExecutor = threadPoolExecutor;
	}

	/**
	 * if RejectedExecutionException happen, send 503 exception to client
	 */
	@Override
	public void handleUpstream(ChannelHandlerContext context, ChannelEvent e) throws Exception {<FILL_FUNCTION_BODY>}

}

		try {
			super.handleUpstream(context, e);
		} catch (RejectedExecutionException rejectException) {
			if (e instanceof MessageEvent) {
				if (((MessageEvent) e).getMessage() instanceof Request) {
					Request request = (Request) ((MessageEvent) e).getMessage();
					DefaultResponse response = new DefaultResponse();
					response.setRequestId(request.getRequestId());
					response.setRpcProtocolVersion(request.getRpcProtocolVersion());
					response.setException(new MotanServiceException("process thread pool is full, reject",
							MotanErrorMsgConstant.SERVICE_REJECT, false));
					e.getChannel().write(response);

					LoggerUtil
							.debug("process thread pool is full, reject, active={} poolSize={} corePoolSize={} maxPoolSize={} taskCount={} requestId={}",
									threadPoolExecutor.getActiveCount(), threadPoolExecutor.getPoolSize(),
									threadPoolExecutor.getCorePoolSize(), threadPoolExecutor.getMaximumPoolSize(),
									threadPoolExecutor.getTaskCount(), request.getRequestId());
				}
			}
		}
	
<no_super_class>