/** * Returns the Internet Protocol (IP) port number of the interface * on which the request was received. */ public int getLocalPort(){ if (localPort == -1){ if (socket != null) { localPort = socket.getLocalPort(); } else { request.action (ActionCode.ACTION_REQ_LOCALPORT_ATTRIBUTE, request); localPort = request.getLocalPort(); } } return localPort; }
/** * Returns the Internet Protocol (IP) port number of the interface * on which the request was received. */ public int getLocalPort(){ if (localPort == -1){ if (socket != null) { localPort = socket.getLocalPort(); } else { request.action (ActionCode.ACTION_REQ_LOCALPORT_ATTRIBUTE, request); localPort = request.getLocalPort(); } } return localPort; }
/** * Complete the {@link Response} and finish/commit it. If a * {@link CompletionHandler} has been defined, its {@link CompletionHandler#resumed(A)} * will first be invoked, then the {@link Response#setCommitted(Boolean)} followed * by {@link Response#finish()}. Those operations commit the response. */ public void resume(){ if (lock.tryAcquire()) { if (!isSuspended){ throw new IllegalStateException("Not Suspended"); } req.action(ActionCode.CANCEL_SUSPENDED_RESPONSE, null); ra.resume(); isSuspended = false; ra = null; lock.release(); } else { throw new IllegalStateException("Not Suspended"); } }
/** * Returns the Internet Protocol (IP) source port of the client * or last proxy that sent the request. */ public int getRemotePort(){ if (remotePort == -1) { if (socket != null) { remotePort = socket.getPort(); } else { request.action (ActionCode.ACTION_REQ_REMOTEPORT_ATTRIBUTE, request); remotePort = request.getRemotePort(); } } return remotePort; }
/** * Returns the Internet Protocol (IP) port number of the interface * on which the request was received. */ public int getLocalPort(){ if (localPort == -1){ if (socket != null) { localPort = socket.getLocalPort(); } else { request.action (ActionCode.ACTION_REQ_LOCALPORT_ATTRIBUTE, request); localPort = request.getLocalPort(); } } return localPort; }
/** * Returns the Internet Protocol (IP) address of the interface on * which the request was received. */ public String getLocalAddr(){ if (localAddr == null) { if (socket != null) { InetAddress inet = socket.getLocalAddress(); localAddr = inet.getHostAddress(); } else { request.action (ActionCode.ACTION_REQ_LOCAL_ADDR_ATTRIBUTE, request); localAddr = request.localAddr().toString(); } } return localAddr; }
/** * Return the remote IP address making this Request. */ public String getRemoteAddr() { if (remoteAddr == null) { if (socket != null) { InetAddress inet = socket.getInetAddress(); remoteAddr = inet.getHostAddress(); } else { request.action (ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, request); remoteAddr = request.remoteAddr().toString(); } } return remoteAddr; }
/** * Return the remote IP address making this Request. */ public String getRemoteAddr() { if (remoteAddr == null) { if (socket != null) { InetAddress inet = socket.getInetAddress(); remoteAddr = inet.getHostAddress(); } else { request.action (ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, request); remoteAddr = request.remoteAddr().toString(); } } return remoteAddr; }
/** * Return the remote IP address making this Request. */ public String getRemoteAddr() { if (remoteAddr == null) { if (socket != null) { InetAddress inet = socket.getInetAddress(); remoteAddr = inet.getHostAddress(); } else { request.action (ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, request); remoteAddr = request.remoteAddr().toString(); } } return remoteAddr; }
/** * Return the remote host name making this Request. */ public String getRemoteHost() { if (remoteHost == null) { if (socket != null) { InetAddress inet = socket.getInetAddress(); remoteHost = inet.getHostName(); } else { request.action (ActionCode.ACTION_REQ_HOST_ATTRIBUTE, request); remoteHost = request.remoteHost().toString(); } } return remoteHost; }
/** * Returns the Internet Protocol (IP) address of the interface on * which the request was received. */ public String getLocalAddr(){ if (localAddr == null) { if (socket != null) { InetAddress inet = socket.getLocalAddress(); localAddr = inet.getHostAddress(); } else { request.action (ActionCode.ACTION_REQ_LOCAL_ADDR_ATTRIBUTE, request); localAddr = request.localAddr().toString(); } } return localAddr; }
/** * Return the remote host name making this Request. */ public String getRemoteHost() { if (remoteHost == null) { if (socket != null) { InetAddress inet = socket.getInetAddress(); remoteHost = inet.getHostName(); } else { request.action (ActionCode.ACTION_REQ_HOST_ATTRIBUTE, request); remoteHost = request.remoteHost().toString(); } } return remoteHost; }
/** * Returns the host name of the Internet Protocol (IP) interface on * which the request was received. */ public String getLocalName(){ if (localName == null) { if (socket != null) { InetAddress inet = socket.getLocalAddress(); localName = inet.getHostName(); } else { request.action (ActionCode.ACTION_REQ_LOCAL_NAME_ATTRIBUTE, request); localName = request.localName().toString(); } } return localName; }
/** * Return the remote host name making this Request. */ public String getRemoteHost() { if (remoteHost == null) { if (socket != null) { InetAddress inet = socket.getInetAddress(); remoteHost = inet.getHostName(); } else { request.action (ActionCode.ACTION_REQ_HOST_ATTRIBUTE, request); remoteHost = request.remoteHost().toString(); } } return remoteHost; }
public String getRemoteAddr() { req.action(ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, null); return req.remoteAddr().toString(); }
public String getRemoteAddr() { req.action(ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, null); return req.remoteAddr().toString(); }
public String getRemoteAddr() { req.action(ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, null); return req.remoteAddr().toString(); }
public void afterService(Request req, Response res) throws Exception { if (res.getStatus() == 404 && !commitErrorResponse){ return; } try{ req.action( ActionCode.ACTION_POST_REQUEST , null); }catch (Throwable t) { logger.log(Level.WARNING,"afterService()",t); } res.finish(); req.recycle(); res.recycle(); }
/** * Read some bytes. */ public int doRead(ByteChunk chunk, Request req) throws IOException { if (request.getResponse().isSuspended()){ request.action(ActionCode.RESET_SUSPEND_TIMEOUT, null); } if (lastActiveFilter == -1) return inputStreamInputBuffer.doRead(chunk, req); else return activeFilters[lastActiveFilter].doRead(chunk,req); }
/** * Read some bytes. */ public int doRead(ByteChunk chunk, Request req) throws IOException { if (request.getResponse().isSuspended()){ request.action(ActionCode.RESET_SUSPEND_TIMEOUT, null); } if (lastActiveFilter == -1) return inputStreamInputBuffer.doRead(chunk, req); else return activeFilters[lastActiveFilter].doRead(chunk,req); }