mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 09:09:38 +02:00
Bump "Error Prone" to 2.0.15
and fix a few things :)
This commit is contained in:
parent
ef0af66b21
commit
4c646436a5
246 changed files with 1122 additions and 124 deletions
|
@ -55,6 +55,7 @@ public final class BOSHConfiguration extends ConnectionConfiguration {
|
|||
return proxy != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProxyInfo getProxyInfo() {
|
||||
return proxy;
|
||||
}
|
||||
|
|
|
@ -203,11 +203,13 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
|
|||
saslFeatureReceived.reportSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSecureConnection() {
|
||||
// TODO: Implement SSL usage
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUsingCompression() {
|
||||
// TODO: Implement compression
|
||||
return false;
|
||||
|
@ -313,16 +315,25 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
|
|||
/**
|
||||
* Initialize the SmackDebugger which allows to log and debug XML traffic.
|
||||
*/
|
||||
@Override
|
||||
protected void initDebugger() {
|
||||
// TODO: Maybe we want to extend the SmackDebugger for simplification
|
||||
// and a performance boost.
|
||||
|
||||
// Initialize a empty writer which discards all data.
|
||||
writer = new Writer() {
|
||||
public void write(char[] cbuf, int off, int len) { /* ignore */}
|
||||
public void close() { /* ignore */ }
|
||||
public void flush() { /* ignore */ }
|
||||
};
|
||||
@Override
|
||||
public void write(char[] cbuf, int off, int len) {
|
||||
/* ignore */}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
/* ignore */ }
|
||||
|
||||
@Override
|
||||
public void flush() {
|
||||
/* ignore */ }
|
||||
};
|
||||
|
||||
// Initialize a pipe for received raw data.
|
||||
try {
|
||||
|
@ -338,6 +349,7 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
|
|||
|
||||
// Add listeners for the received and sent raw data.
|
||||
client.addBOSHClientResponseListener(new BOSHClientResponseListener() {
|
||||
@Override
|
||||
public void responseReceived(BOSHMessageEvent event) {
|
||||
if (event.getBody() != null) {
|
||||
try {
|
||||
|
@ -350,6 +362,7 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
|
|||
}
|
||||
});
|
||||
client.addBOSHClientRequestListener(new BOSHClientRequestListener() {
|
||||
@Override
|
||||
public void requestSent(BOSHMessageEvent event) {
|
||||
if (event.getBody() != null) {
|
||||
try {
|
||||
|
@ -366,6 +379,7 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
|
|||
private Thread thread = this;
|
||||
private int bufferLength = 1024;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
char[] cbuf = new char[bufferLength];
|
||||
|
@ -406,6 +420,7 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
|
|||
* Process the connection listeners and try to login if the
|
||||
* connection was formerly authenticated and is now reconnected.
|
||||
*/
|
||||
@Override
|
||||
public void connectionEvent(BOSHClientConnEvent connEvent) {
|
||||
try {
|
||||
if (connEvent.isConnected()) {
|
||||
|
@ -463,6 +478,7 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
|
|||
*
|
||||
* @param event the BOSH client response which includes the received packet.
|
||||
*/
|
||||
@Override
|
||||
public void responseReceived(BOSHMessageEvent event) {
|
||||
AbstractBody body = event.getBody();
|
||||
if (body != null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue