/** * Accept a pre-made classpath. * NOTE: the path elements must be separated by ":" chars, not ";" * @see org.eclipse.jetty.webapp.WebAppClassLoader#addClassPath(java.lang.String) */ public void addClassPath(String classPath) throws IOException { if (classPath == null) return; if (!"".equals(_path) && !_path.endsWith(":")) _path += ":"; _path += classPath; Log.debug("Path = "+_path); }
protected void writeData(ServletResponse response, String data) throws IOException { idleCheck.activity(); Log.debug("Session["+session.getSessionId()+"]: writeData(START): " + data); ServletOutputStream os = response.getOutputStream(); os.println("Content-Type: text/plain"); os.println(); os.println(data); os.println(boundarySeperator); response.flushBuffer(); Log.debug("Session["+session.getSessionId()+"]: writeData(END): " + data); }
public void preConfigure(WebAppContext context) throws Exception { context.setClassLoader(new AndroidClassLoader(this.getClass().getClassLoader(), context)); super.preConfigure(context); Log.debug("Setting classloader parent="+this.getClass().getClassLoader()+" for context: "+context); }
private void sendPing() { String data = "" + messageId.incrementAndGet(); Log.debug("Session["+sessionId+"]: sendPing " + data); try { handler.sendMessage(new SocketIOFrame(SocketIOFrame.FrameType.PING, 0, data)); } catch (SocketIOException e) { Log.debug("handler.sendMessage failed: ", e); handler.abort(); } startTimeoutTimer(); }
protected void writeData(ServletResponse response, String data) throws IOException { try { getIdleCheck().activity(); } catch (Exception e) { Log.warn(e); } Log.debug("Session["+session.getSessionId()+"]: writeData(START): " + data); ServletOutputStream os = response.getOutputStream(); os.println("Content-Type: text/plain"); os.println(); os.println(data); os.println(boundarySeperator); response.flushBuffer(); Log.debug("Session["+session.getSessionId()+"]: writeData(END): " + data); }
private void sendPing() { String data = "" + messageId.incrementAndGet(); Log.debug("Session["+sessionId+"]: sendPing " + data); try { handler.sendMessage(new SocketIOFrame(SocketIOFrame.FrameType.PING, 0, data)); } catch (SocketIOException e) { Log.debug("handler.sendMessage failed: ", e); handler.abort(); } startTimeoutTimer(); }
private void onTimeout() { Log.debug("Session["+sessionId+"]: onTimeout"); if (!timedout) { timedout = true; state = ConnectionState.CLOSED; onDisconnect(DisconnectReason.TIMEOUT); handler.abort(); } }
@Override public void sendMessage(String message) throws SocketIOException { Log.debug("Session["+session.getSessionId()+"]: " + "sendMessage(String): " + message); sendMessage(SocketIOFrame.TEXT_MESSAGE_TYPE, message); }
private void broadcast(int messageType, String message) { Log.debug("Broadcasting: " + message); for(GWTChatConnection c: connections) { if (c != this) { try { c.outbound.sendMessage(messageType, message); } catch (IOException e) { c.outbound.disconnect(); } } } } }
@Override public void sendMessage(String message) throws SocketIOException { Log.debug("Session["+session.getSessionId()+"]: " + "sendMessage(String): " + message); sendMessage(SocketIOFrame.TEXT_MESSAGE_TYPE, message); }
private void onTimeout() { Log.debug("Session["+sessionId+"]: onTimeout"); if (!timedout) { timedout = true; state = ConnectionState.CLOSED; onDisconnect(DisconnectReason.TIMEOUT); handler.abort(); } }
private void broadcast(int messageType, String message) { Log.debug("Broadcasting: " + message); for(ChatConnection c: connections) { if (c != this) { try { c.outbound.sendMessage(messageType, message); } catch (IOException e) { c.outbound.disconnect(); } } } } }
private void broadcast(int messageType, String message) { Log.debug("Broadcasting: " + message); for(BroadcastConnection c: connections) { if (c != this) { try { c.outbound.sendMessage(messageType, message); } catch (IOException e) { c.outbound.disconnect(); } } } } }
@Override public void startClose() { state = ConnectionState.CLOSING; closeId = "server"; try { handler.sendMessage(new SocketIOFrame(SocketIOFrame.FrameType.CLOSE, 0, closeId)); } catch (SocketIOException e) { Log.debug("handler.sendMessage failed: ", e); handler.abort(); } }
@Override public void onPing(String data) { try { handler.sendMessage(new SocketIOFrame(SocketIOFrame.FrameType.PONG, 0, data)); } catch (SocketIOException e) { Log.debug("handler.sendMessage failed: ", e); handler.abort(); } }
@Override public void startClose() { state = ConnectionState.CLOSING; closeId = "server"; try { handler.sendMessage(new SocketIOFrame(SocketIOFrame.FrameType.CLOSE, 0, closeId)); } catch (SocketIOException e) { Log.debug("handler.sendMessage failed: ", e); handler.abort(); } }
@Override public void onPing(String data) { try { handler.sendMessage(new SocketIOFrame(SocketIOFrame.FrameType.PONG, 0, data)); } catch (SocketIOException e) { Log.debug("handler.sendMessage failed: ", e); handler.abort(); } }
public void init () throws IOException { if (_path==null || "".equals(_path.trim())) _delegate = new DexClassLoader("", ((WebAppContext)getContext()).getTempDirectory().getCanonicalPath(),null,_parent); else _delegate = new DexClassLoader(_path, ((WebAppContext)getContext()).getTempDirectory().getCanonicalPath(), null, _parent); if (Log.isDebugEnabled()) Log.debug("Android webapp classloader path= "+_path+" tmpdir="+ ((WebAppContext)getContext()).getTempDirectory()+" dexloader = "+_delegate+" parentloader="+_parent); }
@Override public void sendMessage(int messageType, String message) throws SocketIOException { synchronized (this) { Log.debug("Session["+session.getSessionId()+"]: " + "sendMessage(int, String): [" + messageType + "]: " + message); if (is_open && session.getConnectionState() == ConnectionState.CONNECTED) { sendMessage(new SocketIOFrame(SocketIOFrame.FrameType.DATA, messageType, message)); } else { throw new SocketIOClosedException(); } } }
@Override public void sendMessage(int messageType, String message) throws SocketIOException { synchronized (this) { Log.debug("Session["+session.getSessionId()+"]: " + "sendMessage(int, String): [" + messageType + "]: " + message); if (is_open && session.getConnectionState() == ConnectionState.CONNECTED) { sendMessage(new SocketIOFrame(SocketIOFrame.FrameType.DATA, messageType, message)); } else { throw new SocketIOClosedException(); } } }