Skip to content

Remove deprecated interfaces and classes #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions src/main/java/com/rabbitmq/client/Channel.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,6 @@ public interface Channel extends ShutdownNotifier {
*/
void close(int closeCode, String closeMessage) throws IOException, TimeoutException;

/**
* Deprecated, superseded by TCP back pressure.
* Will be removed in next major release.
* @deprecated
* @see <a href="http://www.rabbitmq.com/alarms.html">Resource-driven alarms</a>
*/
boolean flowBlocked();

/**
* Abort this channel with the {@link com.rabbitmq.client.AMQP#REPLY_SUCCESS} close code
* and message 'OK'.
Expand Down Expand Up @@ -128,37 +120,6 @@ public interface Channel extends ShutdownNotifier {
*/
void clearReturnListeners();

/**
* Add a {@link FlowListener}.
* Deprecated, superseded by TCP back pressure.
* Will be removed in next major release.
* @deprecated
* @see <a href="http://www.rabbitmq.com/alarms.html">Resource-driven alarms</a>
* @param listener the listener to add
*/
void addFlowListener(FlowListener listener);

/**
* Remove a {@link FlowListener}.
* Deprecated, superseded by TCP back pressure.
* Will be removed in next major release.
* @deprecated
* @see <a href="http://www.rabbitmq.com/alarms.html">Resource-driven alarms</a>
* @param listener the listener to remove
* @return <code><b>true</b></code> if the listener was found and removed,
* <code><b>false</b></code> otherwise
*/
boolean removeFlowListener(FlowListener listener);

/**
* Remove all {@link FlowListener}s.
* Deprecated, superseded by TCP back pressure.
* Will be removed in next major release.
* @deprecated
* @see <a href="http://www.rabbitmq.com/alarms.html">Resource-driven alarms</a>
*/
void clearFlowListeners();

/**
* Add a {@link ConfirmListener}.
* @param listener the listener to add
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/com/rabbitmq/client/ExceptionHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ public interface ExceptionHandler {
*/
void handleReturnListenerException(Channel channel, Throwable exception);

/**
* Perform any required exception processing for the situation
* when the driver thread for the connection has called a
* FlowListener's handleFlow method, and that method has
* thrown an exception.
* @param channel the ChannelN that held the FlowListener
* @param exception the exception thrown by FlowListener.handleFlow
*/
void handleFlowListenerException(Channel channel, Throwable exception);

/**
* Perform any required exception processing for the situation
* when the driver thread for the connection has called a
Expand Down
31 changes: 0 additions & 31 deletions src/main/java/com/rabbitmq/client/FlowListener.java

This file was deleted.

69 changes: 0 additions & 69 deletions src/main/java/com/rabbitmq/client/NullTrustManager.java

This file was deleted.

38 changes: 0 additions & 38 deletions src/main/java/com/rabbitmq/client/impl/ChannelN.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ public class ChannelN extends AMQChannel implements com.rabbitmq.client.Channel
/* All listeners collections are in CopyOnWriteArrayList objects */
/** The ReturnListener collection. */
private final Collection<ReturnListener> returnListeners = new CopyOnWriteArrayList<ReturnListener>();
/** The FlowListener collection. */
private final Collection<FlowListener> flowListeners = new CopyOnWriteArrayList<FlowListener>();
/** The ConfirmListener collection. */
private final Collection<ConfirmListener> confirmListeners = new CopyOnWriteArrayList<ConfirmListener>();

Expand Down Expand Up @@ -147,24 +145,6 @@ public void clearReturnListeners() {
returnListeners.clear();
}

@Override
@Deprecated
public void addFlowListener(FlowListener listener) {
flowListeners.add(listener);
}

@Override
@Deprecated
public boolean removeFlowListener(FlowListener listener) {
return flowListeners.remove(listener);
}

@Override
@Deprecated
public void clearFlowListeners() {
flowListeners.clear();
}

@Override
public void addConfirmListener(ConfirmListener listener) {
confirmListeners.add(listener);
Expand Down Expand Up @@ -353,7 +333,6 @@ private void releaseChannel() {
transmit(new Channel.FlowOk(!_blockContent));
_channelMutex.notifyAll();
}
callFlowListeners(command, channelFlow);
return true;
} else if (method instanceof Basic.Ack) {
Basic.Ack ack = (Basic.Ack) method;
Expand Down Expand Up @@ -469,16 +448,6 @@ private void callReturnListeners(Command command, Basic.Return basicReturn) {
}
}

private void callFlowListeners(@SuppressWarnings("unused") Command command, Channel.Flow channelFlow) {
try {
for (FlowListener l : this.flowListeners) {
l.handleFlow(channelFlow.getActive());
}
} catch (Throwable ex) {
getConnection().getExceptionHandler().handleFlowListenerException(this, ex);
}
}

private void callConfirmListeners(@SuppressWarnings("unused") Command command, Basic.Ack ack) {
try {
for (ConfirmListener l : this.confirmListeners) {
Expand Down Expand Up @@ -1337,13 +1306,6 @@ public Confirm.SelectOk confirmSelect()

}

/** Public API - {@inheritDoc} */
@Override
@Deprecated
public boolean flowBlocked() {
return _blockContent;
}

/** Public API - {@inheritDoc} */
@Override
public long getNextPublishSeqNo() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ public void handleReturnListenerException(Channel channel, Throwable exception)
handleChannelKiller(channel, exception, "ReturnListener.handleReturn");
}

@Override
public void handleFlowListenerException(Channel channel, Throwable exception) {
handleChannelKiller(channel, exception, "FlowListener.handleFlow");
}

@Override
public void handleConfirmListenerException(Channel channel, Throwable exception) {
handleChannelKiller(channel, exception, "ConfirmListener.handle{N,A}ck");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ public void handleReturnListenerException(Channel channel, Throwable exception)
handleChannelKiller(channel, exception, "ReturnListener.handleReturn");
}

@Override
public void handleFlowListenerException(Channel channel, Throwable exception) {
handleChannelKiller(channel, exception, "FlowListener.handleFlow");
}

@Override
public void handleConfirmListenerException(Channel channel, Throwable exception) {
handleChannelKiller(channel, exception, "ConfirmListener.handle{N,A}ck");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public class AutorecoveringChannel implements RecoverableChannel {
private final List<RecoveryListener> recoveryListeners = new CopyOnWriteArrayList<RecoveryListener>();
private final List<ReturnListener> returnListeners = new CopyOnWriteArrayList<ReturnListener>();
private final List<ConfirmListener> confirmListeners = new CopyOnWriteArrayList<ConfirmListener>();
private final List<FlowListener> flowListeners = new CopyOnWriteArrayList<FlowListener>();
private final Set<String> consumerTags = Collections.synchronizedSet(new HashSet<String>());
private int prefetchCountConsumer;
private int prefetchCountGlobal;
Expand Down Expand Up @@ -83,12 +82,6 @@ public void close(int closeCode, String closeMessage) throws IOException, Timeou
}
}

@Override
@Deprecated
public boolean flowBlocked() {
return delegate.flowBlocked();
}

@Override
public void abort() throws IOException {
delegate.abort();
Expand Down Expand Up @@ -117,27 +110,6 @@ public void clearReturnListeners() {
delegate.clearReturnListeners();
}

@Override
@Deprecated
public void addFlowListener(FlowListener listener) {
this.flowListeners.add(listener);
delegate.addFlowListener(listener);
}

@Override
@Deprecated
public boolean removeFlowListener(FlowListener listener) {
this.flowListeners.remove(listener);
return delegate.removeFlowListener(listener);
}

@Override
@Deprecated
public void clearFlowListeners() {
this.flowListeners.clear();
delegate.clearFlowListeners();
}

@Override
public void addConfirmListener(ConfirmListener listener) {
this.confirmListeners.add(listener);
Expand Down Expand Up @@ -607,7 +579,6 @@ public void automaticallyRecover(AutorecoveringConnection connection, Connection
this.recoverShutdownListeners();
this.recoverReturnListeners();
this.recoverConfirmListeners();
this.recoverFlowListeners();
this.recoverState();
this.notifyRecoveryListenersComplete();
}
Expand All @@ -630,13 +601,6 @@ private void recoverConfirmListeners() {
}
}

@Deprecated
private void recoverFlowListeners() {
for(FlowListener fl : this.flowListeners) {
this.delegate.addFlowListener(fl);
}
}

private void recoverState() throws IOException {
if (this.prefetchCountConsumer != 0) {
basicQos(this.prefetchCountConsumer, false);
Expand Down
Loading