mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-12 05:51:08 +01:00
Enable werror for javadoc and fix javadoc issues
This commit is contained in:
parent
4249c1a845
commit
1a3067c89b
323 changed files with 2929 additions and 2704 deletions
|
|
@ -57,17 +57,17 @@ public interface BytestreamRequest {
|
|||
* @throws XMPPErrorException if an error occurred while accepting the bytestream request
|
||||
* @throws InterruptedException if the thread was interrupted while waiting in a blocking
|
||||
* operation
|
||||
* @throws NotConnectedException
|
||||
* @throws CouldNotConnectToAnyProvidedSocks5Host
|
||||
* @throws NoSocks5StreamHostsProvided
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws CouldNotConnectToAnyProvidedSocks5Host if no connection to any provided stream host could be established
|
||||
* @throws NoSocks5StreamHostsProvided if no stream host was provided.
|
||||
*/
|
||||
BytestreamSession accept() throws InterruptedException, XMPPErrorException, CouldNotConnectToAnyProvidedSocks5Host,
|
||||
NotConnectedException, NoSocks5StreamHostsProvided;
|
||||
|
||||
/**
|
||||
* Rejects the bytestream request by sending a reject error to the initiator.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
void reject() throws NotConnectedException, InterruptedException;
|
||||
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ public final class InBandBytestreamManager extends Manager implements Bytestream
|
|||
* @throws XMPPException if the user doesn't support or accept in-band bytestreams, or if the
|
||||
* user prefers smaller block sizes
|
||||
* @throws SmackException if there was no response from the server.
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
@Override
|
||||
public InBandBytestreamSession establishSession(Jid targetJID) throws XMPPException, SmackException, InterruptedException {
|
||||
|
|
@ -419,8 +419,8 @@ public final class InBandBytestreamManager extends Manager implements Bytestream
|
|||
* @throws XMPPErrorException if the user doesn't support or accept in-band bytestreams, or if the
|
||||
* user prefers smaller block sizes
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
@Override
|
||||
public InBandBytestreamSession establishSession(Jid targetJID, String sessionID)
|
||||
|
|
@ -445,8 +445,8 @@ public final class InBandBytestreamManager extends Manager implements Bytestream
|
|||
* not accepted.
|
||||
*
|
||||
* @param request IQ stanza that should be answered with a not-acceptable error
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
protected void replyRejectPacket(IQ request) throws NotConnectedException, InterruptedException {
|
||||
IQ error = IQ.createErrorResponse(request, StanzaError.Condition.not_acceptable);
|
||||
|
|
@ -458,8 +458,8 @@ public final class InBandBytestreamManager extends Manager implements Bytestream
|
|||
* request is rejected because its block size is greater than the maximum allowed block size.
|
||||
*
|
||||
* @param request IQ stanza that should be answered with a resource-constraint error
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
protected void replyResourceConstraintPacket(IQ request) throws NotConnectedException, InterruptedException {
|
||||
IQ error = IQ.createErrorResponse(request, StanzaError.Condition.resource_constraint);
|
||||
|
|
@ -471,8 +471,8 @@ public final class InBandBytestreamManager extends Manager implements Bytestream
|
|||
* session could not be found.
|
||||
*
|
||||
* @param request IQ stanza that should be answered with a item-not-found error
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
protected void replyItemNotFoundPacket(IQ request) throws NotConnectedException, InterruptedException {
|
||||
IQ error = IQ.createErrorResponse(request, StanzaError.Condition.item_not_found);
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ public class InBandBytestreamRequest implements BytestreamRequest {
|
|||
* send/receive data.
|
||||
*
|
||||
* @return the session to send/receive data
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
@Override
|
||||
public InBandBytestreamSession accept() throws NotConnectedException, InterruptedException {
|
||||
|
|
@ -94,8 +94,8 @@ public class InBandBytestreamRequest implements BytestreamRequest {
|
|||
/**
|
||||
* Rejects the In-Band Bytestream request by sending a reject error to the
|
||||
* initiator.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
@Override
|
||||
public void reject() throws NotConnectedException, InterruptedException {
|
||||
|
|
|
|||
|
|
@ -168,8 +168,8 @@ public class InBandBytestreamSession implements BytestreamSession {
|
|||
* This method is invoked if a request to close the In-Band Bytestream has been received.
|
||||
*
|
||||
* @param closeRequest the close request from the remote peer
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
protected void closeByPeer(Close closeRequest) throws NotConnectedException, InterruptedException {
|
||||
|
||||
|
|
@ -636,8 +636,8 @@ public class InBandBytestreamSession implements BytestreamSession {
|
|||
*
|
||||
* @param data the data packet
|
||||
* @throws IOException if an I/O error occurred while sending or if the stream is closed
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
protected abstract void writeToXML(DataPacketExtension data) throws IOException, NotConnectedException, InterruptedException;
|
||||
|
||||
|
|
@ -846,10 +846,10 @@ public class InBandBytestreamSession implements BytestreamSession {
|
|||
|
||||
/**
|
||||
* Process IQ stanza.
|
||||
* @param data
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotLoggedInException
|
||||
* @param data TODO javadoc me please
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @throws NotLoggedInException if the XMPP connection is not authenticated.
|
||||
*/
|
||||
public void processIQPacket(Data data) throws NotConnectedException, InterruptedException, NotLoggedInException {
|
||||
inputStream.dataPacketListener.processStanza(data);
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream
|
|||
/**
|
||||
* Set whether or not the bytestream manager will annouce the local stream host(s), i.e. the local SOCKS5 proxy.
|
||||
*
|
||||
* @param announceLocalStreamHost
|
||||
* @param announceLocalStreamHost TODO javadoc me please
|
||||
* @see #isAnnouncingLocalStreamHostEnabled()
|
||||
* @since 4.4.0
|
||||
*/
|
||||
|
|
@ -435,11 +435,11 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream
|
|||
* @return the Socket to send/receive data to/from the user
|
||||
* @throws IOException if the bytestream could not be established
|
||||
* @throws InterruptedException if the current thread was interrupted while waiting
|
||||
* @throws XMPPException
|
||||
* @throws NotConnectedException
|
||||
* @throws NoResponseException
|
||||
* @throws SmackMessageException
|
||||
* @throws FeatureNotSupportedException
|
||||
* @throws XMPPException if an XMPP protocol error was received.
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws NoResponseException if there was no response from the remote entity.
|
||||
* @throws SmackMessageException if there was an error.
|
||||
* @throws FeatureNotSupportedException if a requested feature is not supported by the remote entity.
|
||||
*/
|
||||
@Override
|
||||
public Socks5BytestreamSession establishSession(Jid targetJID, String sessionID)
|
||||
|
|
@ -540,10 +540,10 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream
|
|||
* @param targetJID the target JID
|
||||
* @return <code>true</code> if the given target JID supports feature SOCKS5 Bytestream
|
||||
* otherwise <code>false</code>
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws XMPPErrorException if there was an XMPP error returned.
|
||||
* @throws NoResponseException if there was no response from the remote entity.
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
private boolean supportsSocks5(Jid targetJID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(targetJID, Bytestream.NAMESPACE);
|
||||
|
|
@ -556,8 +556,8 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream
|
|||
* @return list of JIDs of SOCKS5 proxies
|
||||
* @throws XMPPErrorException if there was an error querying the XMPP server for SOCKS5 proxies
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public List<Jid> determineProxies() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
XMPPConnection connection = connection();
|
||||
|
|
@ -714,8 +714,8 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream
|
|||
* </p>
|
||||
*
|
||||
* @param packet Stanza that should be answered with a not-acceptable error
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
protected void replyRejectPacket(IQ packet) throws NotConnectedException, InterruptedException {
|
||||
StanzaError.Builder xmppError = StanzaError.getBuilder(StanzaError.Condition.not_acceptable);
|
||||
|
|
|
|||
|
|
@ -224,10 +224,10 @@ public class Socks5BytestreamRequest implements BytestreamRequest {
|
|||
*
|
||||
* @return the socket to send/receive data
|
||||
* @throws InterruptedException if the current thread was interrupted while waiting
|
||||
* @throws XMPPErrorException
|
||||
* @throws NotConnectedException
|
||||
* @throws CouldNotConnectToAnyProvidedSocks5Host
|
||||
* @throws NoSocks5StreamHostsProvided
|
||||
* @throws XMPPErrorException if there was an XMPP error returned.
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws CouldNotConnectToAnyProvidedSocks5Host if no connection to any provided stream host could be established
|
||||
* @throws NoSocks5StreamHostsProvided if no stream host was provided.
|
||||
*/
|
||||
@Override
|
||||
public Socks5BytestreamSession accept() throws InterruptedException, XMPPErrorException,
|
||||
|
|
@ -299,8 +299,8 @@ public class Socks5BytestreamRequest implements BytestreamRequest {
|
|||
|
||||
/**
|
||||
* Rejects the SOCKS5 Bytestream request by sending a reject error to the initiator.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
@Override
|
||||
public void reject() throws NotConnectedException, InterruptedException {
|
||||
|
|
@ -312,10 +312,10 @@ public class Socks5BytestreamRequest implements BytestreamRequest {
|
|||
* XMPP exception.
|
||||
*
|
||||
* @param streamHosts the stream hosts.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @throws CouldNotConnectToAnyProvidedSocks5Host as expected result.
|
||||
* @throws NoSocks5StreamHostsProvided
|
||||
* @throws NoSocks5StreamHostsProvided if no stream host was provided.
|
||||
*/
|
||||
private void cancelRequest(Map<StreamHost, Exception> streamHostsExceptions)
|
||||
throws NotConnectedException, InterruptedException, CouldNotConnectToAnyProvidedSocks5Host, NoSocks5StreamHostsProvided {
|
||||
|
|
|
|||
|
|
@ -78,10 +78,10 @@ public class Socks5Client {
|
|||
* @throws IOException if initializing the socket failed due to a network error
|
||||
* @throws TimeoutException if connecting to SOCKS5 proxy timed out
|
||||
* @throws InterruptedException if the current thread was interrupted while waiting
|
||||
* @throws XMPPException
|
||||
* @throws SmackMessageException
|
||||
* @throws NotConnectedException
|
||||
* @throws NoResponseException
|
||||
* @throws XMPPException if an XMPP protocol error was received.
|
||||
* @throws SmackMessageException if there was an error.
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws NoResponseException if there was no response from the remote entity.
|
||||
*/
|
||||
public Socket getSocket(int timeout) throws IOException, InterruptedException,
|
||||
TimeoutException, XMPPException, SmackMessageException, NotConnectedException, NoResponseException {
|
||||
|
|
@ -130,8 +130,8 @@ public class Socks5Client {
|
|||
* supported by the Socks5Client.
|
||||
*
|
||||
* @param socket connected to a SOCKS5 proxy
|
||||
* @throws IOException
|
||||
* @throws SmackMessageException
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws SmackMessageException if there was an error.
|
||||
*/
|
||||
protected void establish(Socket socket) throws IOException, SmackMessageException {
|
||||
|
||||
|
|
|
|||
|
|
@ -107,10 +107,10 @@ public class Socks5ClientForInitiator extends Socks5Client {
|
|||
/**
|
||||
* Activates the SOCKS5 Bytestream by sending an XMPP SOCKS5 Bytestream activation stanza to the
|
||||
* SOCKS5 proxy.
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws XMPPErrorException if there was an XMPP error returned.
|
||||
* @throws NoResponseException if there was no response from the remote entity.
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
private void activate() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
Bytestream activate = createStreamHostActivation();
|
||||
|
|
|
|||
|
|
@ -230,6 +230,8 @@ public class Socks5Proxy {
|
|||
|
||||
/**
|
||||
* Starts the local SOCKS5 proxy server. If it is already running, this method does nothing.
|
||||
*
|
||||
* @return the server socket.
|
||||
*/
|
||||
public synchronized ServerSocket start() {
|
||||
if (isRunning()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue