public class Lyrebird extends Object
| Constructor and Description |
|---|
Lyrebird() |
Lyrebird(String lyrebirdRemoteAddress) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(Method method)
Activate lyrebird mock data group by @MockData annotation
|
void |
activate(String groupID)
Activate lyrebird mock data group by group ID
|
void |
clearFlowList()
Clear all flow data
|
void |
deactivate()
Deactivate lyrebird mock data group
|
EventDetail[] |
getEventList(String channel)
Get event list by channel
|
FlowDetail |
getFlowDetail(String flowID)
Get Lyrebird flow data detail
|
Flow[] |
getFlowList()
Get a set of flow data from lyrebird API
|
Status |
getLyrebirdStatus()
Get lyrebird services status
|
LBMockData |
getMockData(String dataId)
Get mock data by data id
|
static String |
getRemoteAddress()
get remote lyrebird server address
|
io.socket.client.Socket |
getSocketInstance()
Get an object of socket io
|
SpeedLimit |
getSpeedLimit()
get the speed limit bandwidth
|
static void |
setRemoteAddress(String url)
set remote lyrebird server address
|
void |
setSpeedLimit(Bandwidth bandwidth)
set the speed limit
|
public Lyrebird()
public Lyrebird(String lyrebirdRemoteAddress)
public static void setRemoteAddress(String url)
url - e.g http://localhost:9090public static String getRemoteAddress()
public void activate(String groupID) throws LyrebirdClientException
LyrebirdClientExceptionpublic void activate(Method method) throws LyrebirdClientException
method - test methodLyrebirdClientExceptionpublic void deactivate()
throws LyrebirdClientException
LyrebirdClientExceptionpublic Status getLyrebirdStatus() throws LyrebirdClientException
LyrebirdClientExceptionpublic Flow[] getFlowList() throws LyrebirdClientException
LyrebirdClientExceptionpublic FlowDetail getFlowDetail(String flowID) throws LyrebirdClientException
flowID - The unique indication of the flow dataLyrebirdClientExceptionpublic void clearFlowList()
throws LyrebirdClientException
LyrebirdClientExceptionpublic EventDetail[] getEventList(String channel) throws LyrebirdClientException
channel - channel nameLyrebirdClientExceptionpublic LBMockData getMockData(String dataId) throws LyrebirdClientException
dataId - mock data idLyrebirdClientExceptionpublic void setSpeedLimit(Bandwidth bandwidth) throws LyrebirdClientException
bandwidth - BANDWIDTH_2G对应2G;BANDWIDTH_2_5G对应2.5G;BANDWIDTH_3G对应3G;UNLIMITED对应无限制LyrebirdClientExceptionpublic SpeedLimit getSpeedLimit() throws LyrebirdClientException
LyrebirdClientExceptionpublic io.socket.client.Socket getSocketInstance()
throws URISyntaxException,
LyrebirdClientException
URISyntaxExceptionLyrebirdClientExceptionCopyright © 2020. All rights reserved.