Back to project page android-ssl-bypass.
The source code is released under:
Copyright (c) 2012, iSEC Partners. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the ...
If you think the Android project android-ssl-bypass listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.isecpartners.android.jdwp.common; /* w w w .j av a2 s .c om*/ import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import org.apache.log4j.Logger; public abstract class QueueAgent extends Thread implements QueueAgentInterface{ private final static org.apache.log4j.Logger LOGGER = Logger .getLogger(QueueAgent.class.getName()); protected BlockingQueue<Message> messageIN; protected BlockingQueue<Message> messageOUT; public QueueAgent() { this.messageIN = new LinkedBlockingQueue<Message>(); this.messageOUT = new LinkedBlockingQueue<Message>(); } public void setQueueAgentListener(QueueAgentInterface qap) { qap.setMessageIN(this.messageOUT); qap.setMessageOUT(this.messageIN); } public Message getMessage() throws InterruptedException { Message msg = this.messageIN.take(); QueueAgent.LOGGER.info("received msg: " + msg.getType().name()); return msg; } public void sendMessage(Message msg) throws InterruptedException { QueueAgent.LOGGER.info("sending msg: " + msg.getType().name()); this.messageOUT.put(msg); } public void setMessageIN(BlockingQueue<Message> out) { this.messageIN = out; } public void setMessageOUT(BlockingQueue<Message> in) { this.messageOUT = in; } }