added properties for userName/password

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@390370 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-03-31 08:58:20 +00:00
parent 44ab524349
commit e44aee930e
1 changed files with 34 additions and 0 deletions

View File

@ -58,6 +58,8 @@ public class MasterConnector implements Service{
private AtomicBoolean masterActive=new AtomicBoolean(false);
private AtomicBoolean started=new AtomicBoolean(false);
private final IdGenerator idGenerator=new IdGenerator();
private String userName;
private String password;
ConnectionInfo connectionInfo;
SessionInfo sessionInfo;
@ -126,6 +128,8 @@ public class MasterConnector implements Service{
connectionInfo=new ConnectionInfo();
connectionInfo.setConnectionId(new ConnectionId(idGenerator.generateId()));
connectionInfo.setClientId(idGenerator.generateId());
connectionInfo.setUserName(userName);
connectionInfo.setPassword(password);
localBroker.oneway(connectionInfo);
remoteBroker.oneway(connectionInfo);
@ -240,10 +244,40 @@ public class MasterConnector implements Service{
public void setRemoteURI(URI remoteURI){
this.remoteURI=remoteURI;
}
/**
* @return Returns the password.
*/
public String getPassword(){
return password;
}
/**
* @param password The password to set.
*/
public void setPassword(String password){
this.password=password;
}
/**
* @return Returns the userName.
*/
public String getUserName(){
return userName;
}
/**
* @param userName The userName to set.
*/
public void setUserName(String userName){
this.userName=userName;
}
private void shutDown(){
masterActive.set(false);
broker.masterFailed();
ServiceSupport.dispose(this);
}
}