public class ConnectionView extends LinearLayout implements IBlaubotConnectionManagerListener, IBlaubotDebugView
Constructor and Description |
---|
ConnectionView(Context context,
AttributeSet attrs) |
Modifier and Type | Method and Description |
---|---|
void |
addConnection(IBlaubotConnection connection)
Adds a connection and refreshes the view
|
void |
addConnections(java.util.Collection<IBlaubotConnection> connectionList)
Adds a list of mConnections, then updates the view.
|
void |
clearConnections()
Removes all mConnections and refreshes the view
|
void |
onConnectionClosed(IBlaubotConnection connection)
Called when a connection was closed (for any reason)
|
void |
onConnectionEstablished(IBlaubotConnection connection)
Called when a connection was established.
|
void |
registerBlaubotInstance(Blaubot blaubot)
Registers the blaubot instance to a view
|
void |
removeConnection(IBlaubotConnection connection)
Removes a connection and refreshes the view
|
void |
unregisterBlaubotInstance()
Unregisters the associated blaubot instance from a view (if any)
|
public void registerBlaubotInstance(Blaubot blaubot)
IBlaubotDebugView
registerBlaubotInstance
in interface IBlaubotDebugView
blaubot
- the instance to be introspectedpublic void unregisterBlaubotInstance()
IBlaubotDebugView
unregisterBlaubotInstance
in interface IBlaubotDebugView
public void onConnectionEstablished(IBlaubotConnection connection)
IBlaubotIncomingConnectionListener
onConnectionEstablished
in interface IBlaubotIncomingConnectionListener
connection
- the newly established connectionpublic void onConnectionClosed(IBlaubotConnection connection)
IBlaubotConnectionListener
onConnectionClosed
in interface IBlaubotConnectionListener
connection
- the connection that was just closedpublic void addConnections(java.util.Collection<IBlaubotConnection> connectionList)
connectionList
- the list of connections to be addedpublic void addConnection(IBlaubotConnection connection)
connection
- the connection to be addedpublic void removeConnection(IBlaubotConnection connection)
connection
- the connection to be addedpublic void clearConnections()