org.apache.activemq.broker.ft
Class MasterConnector

java.lang.Object
  extended by org.apache.activemq.broker.ft.MasterConnector
All Implemented Interfaces:
BrokerServiceAware, Service

public class MasterConnector
extends Object
implements Service, BrokerServiceAware

Connects a Slave Broker to a Master when using Master Slave for High Availability of messages.


Constructor Summary
MasterConnector()
           
MasterConnector(String remoteUri)
           
 
Method Summary
 URI getLocalURI()
           
 String getPassword()
           
 URI getRemoteURI()
           
 String getUserName()
           
 boolean isFailedToStart()
          Get the failedToStart
 boolean isSlave()
           
 boolean isStoppedBeforeStart()
           
protected  void restartBridge()
           
protected  void serviceLocalException(Throwable error)
           
protected  void serviceRemoteCommand(Command command)
           
protected  void serviceRemoteException(IOException error)
           
 void setBrokerService(BrokerService broker)
           
 void setFailedToStart(boolean failedToStart)
          Set the failedToStart
 void setLocalURI(URI localURI)
           
 void setPassword(String password)
           
 void setRemoteURI(URI remoteURI)
           
 void setUserName(String userName)
           
 void start()
           
protected  void startBridge()
           
 void stop()
           
 void stopBeforeConnected()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MasterConnector

public MasterConnector()

MasterConnector

public MasterConnector(String remoteUri)
                throws URISyntaxException
Throws:
URISyntaxException
Method Detail

setBrokerService

public void setBrokerService(BrokerService broker)
Specified by:
setBrokerService in interface BrokerServiceAware

isSlave

public boolean isSlave()

restartBridge

protected void restartBridge()
                      throws Exception
Throws:
Exception

start

public void start()
           throws Exception
Specified by:
start in interface Service
Throws:
Exception

startBridge

protected void startBridge()
                    throws Exception
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface Service
Throws:
Exception

stopBeforeConnected

public void stopBeforeConnected()
                         throws Exception
Throws:
Exception

serviceRemoteException

protected void serviceRemoteException(IOException error)

serviceRemoteCommand

protected void serviceRemoteCommand(Command command)

serviceLocalException

protected void serviceLocalException(Throwable error)

getLocalURI

public URI getLocalURI()
Returns:
Returns the localURI.

setLocalURI

public void setLocalURI(URI localURI)
Parameters:
localURI - The localURI to set.

getRemoteURI

public URI getRemoteURI()
Returns:
Returns the remoteURI.

setRemoteURI

public void setRemoteURI(URI remoteURI)
Parameters:
remoteURI - The remoteURI to set.

getPassword

public String getPassword()
Returns:
Returns the password.

setPassword

public void setPassword(String password)
Parameters:
password - The password to set.

getUserName

public String getUserName()
Returns:
Returns the userName.

setUserName

public void setUserName(String userName)
Parameters:
userName - The userName to set.

isStoppedBeforeStart

public boolean isStoppedBeforeStart()

isFailedToStart

public boolean isFailedToStart()
Get the failedToStart

Returns:
the failedToStart

setFailedToStart

public void setFailedToStart(boolean failedToStart)
Set the failedToStart

Parameters:
failedToStart - the failedToStart to set


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.