|
|
|
@ -16,6 +16,10 @@
@@ -16,6 +16,10 @@
|
|
|
|
|
|
|
|
|
|
package org.springframework.cloud.client.loadbalancer; |
|
|
|
|
|
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
|
import org.springframework.core.style.ToStringCreator; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* A default implementation of {@link Request}. |
|
|
|
|
* |
|
|
|
@ -43,4 +47,28 @@ public class DefaultRequest<T> implements Request<T> {
@@ -43,4 +47,28 @@ public class DefaultRequest<T> implements Request<T> {
|
|
|
|
|
this.context = context; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public String toString() { |
|
|
|
|
ToStringCreator to = new ToStringCreator(this); |
|
|
|
|
to.append("context", context); |
|
|
|
|
return to.toString(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean equals(Object o) { |
|
|
|
|
if (this == o) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
if (!(o instanceof DefaultRequest)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
DefaultRequest<?> that = (DefaultRequest<?>) o; |
|
|
|
|
return Objects.equals(context, that.context); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public int hashCode() { |
|
|
|
|
return Objects.hash(context); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|