public class PersistentConnect extends AConnect implements IConnectResourceRegister, IConnectAuth<java.util.Map<java.lang.String,java.lang.String>>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONNECT_ID |
connectId, connectInfo, connectOption, connectState, notifyListener
Constructor and Description |
---|
PersistentConnect() |
Modifier and Type | Method and Description |
---|---|
boolean |
getIsDestroyed() |
void |
init(Context context,
AConnectConfig config,
IConnectInitListener initListener) |
void |
onAuth(java.util.Map<java.lang.String,java.lang.String> authInfo) |
void |
onDestroy() |
void |
onPrepareAuthFail(AError error) |
void |
publishResource(AResource resource,
IBaseListener listener) |
void |
registerResource(AResource resource,
IResourceRequestListener listener) |
void |
send(ARequest request,
IConnectSendListener sendListener) |
void |
setNotifyListener(IConnectNotifyListener notifyListener) |
void |
subscribe(ARequest subscribe,
IConnectSubscribeListener subscribeListener) |
void |
subscribeRrpc(ARequest request,
IConnectRrpcListener rrpcListener)
MQTT RRPC请求模式。
已废弃,请使用资源注册模型,IConnectResourceRegister。
|
void |
unregisterResource(AResource resource,
IBaseListener listener) |
void |
unsubscribe(ARequest subscribe,
IConnectUnscribeListener unscribeListener) |
getConnectId, getConnectInfo, getConnectState, setConnectId, updateConnectOption, updateConnectState
public static final java.lang.String CONNECT_ID
public void init(Context context, AConnectConfig config, IConnectInitListener initListener)
public boolean getIsDestroyed()
public void setNotifyListener(IConnectNotifyListener notifyListener)
setNotifyListener
in class AConnect
public void onAuth(java.util.Map<java.lang.String,java.lang.String> authInfo)
onAuth
in interface IConnectAuth<java.util.Map<java.lang.String,java.lang.String>>
public void onPrepareAuthFail(AError error)
onPrepareAuthFail
in interface IConnectAuth<java.util.Map<java.lang.String,java.lang.String>>
public void send(ARequest request, IConnectSendListener sendListener)
public void subscribe(ARequest subscribe, IConnectSubscribeListener subscribeListener)
public void unsubscribe(ARequest subscribe, IConnectUnscribeListener unscribeListener)
unsubscribe
in class AConnect
public void subscribeRrpc(ARequest request, IConnectRrpcListener rrpcListener)
AConnect
subscribeRrpc
in class AConnect
public void registerResource(AResource resource, IResourceRequestListener listener)
registerResource
in interface IConnectResourceRegister
public void unregisterResource(AResource resource, IBaseListener listener)
unregisterResource
in interface IConnectResourceRegister
public void publishResource(AResource resource, IBaseListener listener)
publishResource
in interface IConnectResourceRegister