public class BridgeImpl extends Object implements Bridge, SessionFailureListener, SendAcknowledgementHandler
| Modifier and Type | Field and Description |
|---|---|
protected Executor |
executor |
protected ScheduledFuture<?> |
futureScheduledReconnection
Used when there's a scheduled reconnection
|
protected ScheduledExecutorService |
scheduledExecutor |
protected ServerLocatorInternal |
serverLocator |
protected ClientSessionInternal |
session |
| Constructor and Description |
|---|
BridgeImpl(ServerLocatorInternal serverLocator,
int reconnectAttempts,
long retryInterval,
double retryMultiplier,
long maxRetryInterval,
UUID nodeUUID,
SimpleString name,
Queue queue,
Executor executor,
SimpleString filterString,
SimpleString forwardingAddress,
ScheduledExecutorService scheduledExecutor,
Transformer transformer,
boolean useDuplicateDetection,
String user,
String password,
boolean activated,
StorageManager storageManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
protected void |
afterConnect() |
protected ServerMessage |
beforeForward(ServerMessage message) |
void |
beforeReconnect(HornetQException exception)
Notifies that a connection has failed due to the specified exception.
|
protected void |
connect() |
void |
connectionFailed(HornetQException me,
boolean failedOver)
Notifies that a connection has failed due to the specified exception.
|
protected ClientSessionFactoryInternal |
createSessionFactory() |
String |
debug() |
void |
disconnect()
To be called when the server sent a disconnect to the client.
|
protected void |
fail(boolean permanently) |
void |
flushExecutor() |
protected ClientSessionFactoryInternal |
getCurrentFactory() |
static byte[] |
getDuplicateBytes(UUID nodeUUID,
long messageID) |
Executor |
getExecutor()
The cluster manager needs to use the same executor to close the serverLocator, otherwise the stop will break.
|
Filter |
getFilter() |
SimpleString |
getForwardingAddress() |
RemotingConnection |
getForwardingConnection() |
SimpleString |
getName() |
Queue |
getQueue() |
Transformer |
getTransformer() |
HandleStatus |
handle(MessageReference ref) |
boolean |
isConnected() |
boolean |
isStarted() |
boolean |
isUseDuplicateDetection() |
void |
pause() |
void |
resume() |
protected void |
scheduleRetryConnect() |
protected void |
scheduleRetryConnectFixedTimeout(long milliseconds) |
void |
sendAcknowledged(Message message)
Notifies the client that a message sent asynchronously has been received by the server.
|
void |
setNotificationService(NotificationService notificationService) |
void |
start() |
void |
stop() |
String |
toString() |
protected void |
tryScheduleRetryReconnect(int code) |
protected final ServerLocatorInternal serverLocator
protected final Executor executor
protected final ScheduledExecutorService scheduledExecutor
protected ScheduledFuture<?> futureScheduledReconnection
protected volatile ClientSessionInternal session
public BridgeImpl(ServerLocatorInternal serverLocator, int reconnectAttempts, long retryInterval, double retryMultiplier, long maxRetryInterval, UUID nodeUUID, SimpleString name, Queue queue, Executor executor, SimpleString filterString, SimpleString forwardingAddress, ScheduledExecutorService scheduledExecutor, Transformer transformer, boolean useDuplicateDetection, String user, String password, boolean activated, StorageManager storageManager) throws Exception
Exceptionpublic void setNotificationService(NotificationService notificationService)
setNotificationService in interface Bridgepublic void start()
throws Exception
start in interface HornetQComponentExceptionpublic void flushExecutor()
flushExecutor in interface Bridgepublic void disconnect()
Bridgedisconnect in interface Bridgepublic boolean isConnected()
isConnected in interface Bridgepublic Executor getExecutor()
public void stop()
throws Exception
stop in interface HornetQComponentExceptionpublic void pause()
throws Exception
public void resume()
throws Exception
public boolean isStarted()
isStarted in interface HornetQComponentpublic SimpleString getName()
public SimpleString getForwardingAddress()
getForwardingAddress in interface Bridgepublic Transformer getTransformer()
getTransformer in interface Bridgepublic boolean isUseDuplicateDetection()
isUseDuplicateDetection in interface Bridgepublic RemotingConnection getForwardingConnection()
getForwardingConnection in interface Bridgepublic void sendAcknowledged(Message message)
SendAcknowledgementHandlersendAcknowledged in interface SendAcknowledgementHandlermessage - message sent asynchronouslyprotected ServerMessage beforeForward(ServerMessage message)
public static byte[] getDuplicateBytes(UUID nodeUUID, long messageID)
message - public HandleStatus handle(MessageReference ref) throws Exception
public void connectionFailed(HornetQException me, boolean failedOver)
FailureListenerconnectionFailed in interface FailureListenerme - exception which has caused the connection to failprotected void tryScheduleRetryReconnect(int code)
public void beforeReconnect(HornetQException exception)
SessionFailureListenerbeforeReconnect in interface SessionFailureListenerexception - exception which has caused the connection to failprotected void fail(boolean permanently)
protected ClientSessionFactoryInternal getCurrentFactory()
protected ClientSessionFactoryInternal createSessionFactory() throws Exception
Exceptionprotected void connect()
protected void scheduleRetryConnect()
protected void scheduleRetryConnectFixedTimeout(long milliseconds)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.