|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.neeve.root.RootObject
com.neeve.sma.SmaObject
com.neeve.sma.impl.loopback.LoopbackBus
public final class LoopbackBus
The loopback bus implementation.
| Nested Class Summary | |
|---|---|
class |
LoopbackBus.Agent
Represents a messaging agent |
class |
LoopbackBus.AgentParameters
Contains an agent's operating parameters |
static class |
LoopbackBus.AgentQueueWaitStrategy
Enumerates a agent's queue wait strategy |
class |
LoopbackBus.AgentTestController
Implements an agent's test controller. |
class |
LoopbackBus.TestController
Implements an agent's test controller. |
| Method Summary | |
|---|---|
boolean |
agentHasSubscriptions(String name)
Return if an agent has active subscriptions |
static void |
clearAllInstances()
Clear all loopback bus instances |
void |
clearMessageDiscard()
Clear the discard message setting |
void |
discardMessages()
Set the bus to discard all inbound messages |
void |
dumpActivityTrackingInfo()
If Activity Tracking has been enabled for, will dump the current Activity Tracking History for this bus. |
void |
dumpPendingAck(StringBuilder builder)
Dumps diagnostic information about guaranteed messages pending acknowledgement to the provide StringBuilder |
void |
enableWaitForQuiescence(boolean val)
Enable a loopback bus's 'wait for quiescence" feature |
LoopbackBus.Agent |
getAgent(String name)
Get a connected agent |
LoopbackBus.AgentParameters |
getAgentParameters(String name)
Get an agent's operating parameters |
LoopbackBus.AgentTestController |
getAgentTestController(String name)
Get an agent's test controller. |
static LoopbackBus |
getInstance()
Return the default loopback bus instance |
static LoopbackBus |
getInstance(String name)
Return a named loopback bus instance. |
LoopbackBus.TestController |
getTestController()
Returns the overal |
boolean |
isAgentConnected(String name)
Check if an agent is connected to the bus |
LoopbackBus |
reset()
Reset a loopback bus. |
boolean |
waitForPendingAcks(long timeout)
Waits for acknowledgements for guaranteed messages sent through this bus. |
boolean |
waitForPendingAcks(long timeout,
TimeUnit timeUnit)
Equivalent to calling waitForPendingAcks(long, TimeUnit) with TimeUnit.MILLISECONDS |
void |
waitForQuiescence()
Wait for quiescence with no timeout. |
boolean |
waitForQuiescence(long timeout)
Wait for quiescence for a specified timeout (in milliseconds) |
boolean |
waitForQuiescence(long timeout,
TimeUnit timeUnit)
Wait for quiescence for a specified time (in TimeUnits) |
| Methods inherited from class com.neeve.root.RootObject |
|---|
getChecked, getThreaded, getTracer, setChecked, setTracer |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static LoopbackBus getInstance(String name)
name - The name of the bus to return.
public static LoopbackBus getInstance()
public static void clearAllInstances()
public final LoopbackBus.AgentParameters getAgentParameters(String name)
name - The agent's name.public final LoopbackBus.AgentTestController getAgentTestController(String name)
name - The agent's name.public LoopbackBus.TestController getTestController()
public final LoopbackBus reset()
This method resets a bus. After returning from this method, the bus state is equivalent to a newly created bus.
public final boolean isAgentConnected(String name)
public final boolean agentHasSubscriptions(String name)
public final LoopbackBus.Agent getAgent(String name)
name - The agent's namepublic final void enableWaitForQuiescence(boolean val)
public final boolean waitForPendingAcks(long timeout,
TimeUnit timeUnit)
waitForPendingAcks(long, TimeUnit) with TimeUnit.MILLISECONDS
timeout - The amount of time to wait for pending acknowledgements.timeUnit - The timeout used to wait
waitForPendingAcks(long)public final boolean waitForPendingAcks(long timeout)
If a timeout of 0 or less is specified the calling thread will wait until either the count of messages pending acknowledgements reaches 0 or the calling thread is interrupted.
In the event that the caller is interrupted, an InterruptedException is not thrown. Instead
the thread is re-interrupted and false is returned
timeout - The amount of time to wait for pending acknowledgements
public final void dumpPendingAck(StringBuilder builder)
StringBuilder
builder - The StringBuilder into which to write the diagnosticspublic final void waitForQuiescence()
public final boolean waitForQuiescence(long timeout)
timeout - The timeout to wait (in milliseconds). Specifying
a value of < 0 is equivalent to invoking waitForQuiescence()
public final boolean waitForQuiescence(long timeout,
TimeUnit timeUnit)
timeout - The timeout to wait (in units specified by timeUnit)timeUnit - The time unit to use to interpret timeout
public final void dumpActivityTrackingInfo()
public final void discardMessages()
public final void clearMessageDiscard()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||