public class Bus extends java.lang.Object implements SubscriptionChangeListener
| Modifier and Type | Field and Description |
|---|---|
static java.util.regex.Pattern |
BUS_NAME_PATTERN |
| Constructor and Description |
|---|
Bus() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBusChangeListener(BusChangeListener listener)
A
BusChangeListener may use this method if he wants to be notified
about changes to the bus like added connections etc. |
void |
addEventFrameListener(EventFrameListener listener) |
void |
addSendJob(int id,
boolean extended,
byte[] data,
long usec) |
void |
addSubscription(Subscription s) |
void |
destroy()
Shall be called if the bus is removed.
|
void |
disableStatistics() |
void |
disconnect()
If the Bus was connected terminate all connections.
|
void |
enableStatistics(int interval) |
java.lang.String |
getAlias()
Returns the human readable name of the bus.
|
BusURL |
getConnection() |
BusDescription |
getDescription() |
java.lang.String |
getName()
Returns the name of the bus.
|
TimeSource |
getTimeSource() |
void |
registerStatisticsReceiver(StatisticsListener receiver) |
void |
removeBusChangeListener(BusChangeListener listener) |
void |
removeEventFrameListener(EventFrameListener listener) |
void |
removeSendJob(int id,
boolean extended) |
void |
removeStatisticsReceiver(StatisticsListener receiver) |
void |
sendEventFrame(EventFrame f) |
void |
sendFrame(Frame frame)
Send a frame on the bus.
|
void |
setAlias(java.lang.String alias) |
void |
setConnection(BusURL url)
Connect the Bus to a given BusURL.
|
void |
setDescription(BusDescription desc) |
void |
setName(java.lang.String name) |
void |
setTimeSource(TimeSource timeSource)
Set the
TimeSource that will be used to coordinate
the message flow on the bus (play, pause, timestamps...) |
void |
subscribed(int id,
boolean extended,
Subscription s) |
void |
subscriptionAllChanged(boolean all,
Subscription s) |
void |
subscriptionTerminated(Subscription s) |
java.lang.String |
toString() |
void |
unsubscribed(int id,
boolean extended,
Subscription s) |
public java.lang.String toString()
toString in class java.lang.Objectpublic BusURL getConnection()
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getAlias()
public void setAlias(java.lang.String alias)
public void registerStatisticsReceiver(StatisticsListener receiver)
public void removeStatisticsReceiver(StatisticsListener receiver)
public void enableStatistics(int interval)
public void disableStatistics()
public void destroy()
public TimeSource getTimeSource()
public void setTimeSource(TimeSource timeSource)
TimeSource that will be used to coordinate
the message flow on the bus (play, pause, timestamps...)public void addSubscription(Subscription s)
addSubscription in interface SubscriptionChangeListenerpublic void subscribed(int id,
boolean extended,
Subscription s)
subscribed in interface SubscriptionChangeListenerpublic void unsubscribed(int id,
boolean extended,
Subscription s)
unsubscribed in interface SubscriptionChangeListenerpublic void subscriptionAllChanged(boolean all,
Subscription s)
subscriptionAllChanged in interface SubscriptionChangeListenerpublic void subscriptionTerminated(Subscription s)
subscriptionTerminated in interface SubscriptionChangeListenerpublic void addBusChangeListener(BusChangeListener listener)
BusChangeListener may use this method if he wants to be notified
about changes to the bus like added connections etc.public void removeBusChangeListener(BusChangeListener listener)
public void setConnection(BusURL url)
public void disconnect()
public void sendFrame(Frame frame)
public void addSendJob(int id,
boolean extended,
byte[] data,
long usec)
public void removeSendJob(int id,
boolean extended)
public void addEventFrameListener(EventFrameListener listener)
public void removeEventFrameListener(EventFrameListener listener)
public void sendEventFrame(EventFrame f)
public void setDescription(BusDescription desc)
public BusDescription getDescription()
Data In Motion Consulting GmbH