git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@616811 13f79535-47bb-0310-9956-ffa450edef68

This commit is contained in:
Robert Davies 2008-01-30 16:42:39 +00:00
parent a55149cad0
commit 5f83e62d66
1 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,53 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.activemq.transport.failover;
import java.net.URI;
import org.apache.activemq.transport.Transport;
public class BackupTransport {
private Transport transport;
private URI uri;
public Transport getTransport() {
return transport;
}
public void setTransport(Transport transport) {
this.transport = transport;
}
public URI getUri() {
return uri;
}
public void setUri(URI uri) {
this.uri = uri;
}
public int hashCode() {
return uri != null ? uri.hashCode():-1;
}
public boolean equals(Object obj) {
if (obj instanceof BackupTransport) {
BackupTransport other = (BackupTransport) obj;
return uri== null && other.uri==null ||
(uri != null && other.uri != null && uri.equals(other.uri));
}
return false;
}
}