Skip to content

refactor: #696

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
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* @since 3.3.0
*/
public class RecordedEntity {
public abstract class RecordedEntity {
protected final AutorecoveringChannel channel;

public RecordedEntity(AutorecoveringChannel channel) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public RecordedExchange(AutorecoveringChannel channel, String name) {
super(channel, name);
}

@Override
public void recover() throws IOException {
this.channel.getDelegate().exchangeDeclare(this.name, this.type, this.durable, this.autoDelete, this.arguments);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@

package com.rabbitmq.client.impl.recovery;

import java.io.IOException;
/**
* @since 3.3.0
*/
public class RecordedNamedEntity extends RecordedEntity {
public abstract class RecordedNamedEntity extends RecordedEntity {
protected String name;

public RecordedNamedEntity(AutorecoveringChannel channel, String name) {
super(channel);
this.name = name;
}

public abstract void recover() throws IOException;

public String getName() {
return name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public boolean isServerNamed() {
return this.serverNamed;
}

@Override
public void recover() throws IOException {
this.name = this.channel.getDelegate().queueDeclare(this.getNameToUseForRecovery(),
this.durable,
Expand All @@ -71,7 +72,7 @@ public RecordedQueue durable(boolean value) {
this.durable = value;
return this;
}

public boolean isDurable() {
return this.durable;
}
Expand All @@ -80,7 +81,7 @@ public RecordedQueue autoDelete(boolean value) {
this.autoDelete = value;
return this;
}

public boolean isAutoDelete() {
return this.autoDelete;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public RecordedQueueBinding(AutorecoveringChannel channel) {

@Override
public void recover() throws IOException {
this.channel.getDelegate().queueBind(this.getDestination(), this.getSource(), this.routingKey, this.arguments);
this.channel.getDelegate().queueBind(this.destination, this.source, this.routingKey, this.arguments);
}

@Override
Expand Down