public class Connection extends Object implements Closeable
| 限定符和类型 | 字段和说明 |
|---|---|
String |
address |
Client |
client |
String |
schemaID |
String |
scope |
String |
secret |
String |
userCert |
| 构造器和说明 |
|---|
Connection() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Close a connection.
|
Connection |
connect(String url)
Connect to a websocket address.
|
Connection |
connect(String url,
String serverCertPath,
String storePass) |
void |
disconnect()
Disconnect from websocket connection.
|
String |
getAddress()
Get account address.
|
Client |
getClient()
Get Client object.
|
String |
getScope()
Get scope
|
String |
getSecret() |
void |
setAddress(String address)
Set account address.
|
void |
setClient(Client client)
Set Client object.
|
void |
setScope(String scope)
Set scope.
|
void |
setSecret(String secret)
Set secret.
|
public String address
public String secret
public String scope
public Client client
public String userCert
public String schemaID
public Connection connect(String url)
url - Websocket url.public Connection connect(String url, String serverCertPath, String storePass)
public void disconnect()
public Client getClient()
public void setClient(Client client)
client - client.public String getAddress()
public void setAddress(String address)
address - Account address.public String getSecret()
public void setSecret(String secret)
secret - Account secret.public String getScope()
public void setScope(String scope)
scope - Scope value.public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionCopyright © 2021. All rights reserved.