@Beta public class ChannelService extends Object
| Constructor and Description |
|---|
ChannelService()
Provides a Channel Service that contains all necessary credentials and can be used to receive a network object
from the Fabric Service.
|
ChannelService(String userProvidedServiceName)
Provides a Channel Service that contains all necessary credentials and can be used to receive a network object
from the Fabric Service.
|
ChannelService(String userName,
String mspId,
X509Certificate certificate,
PrivateKey privateKey,
String channelName,
byte[] connectionProfile)
Provides a Channel Service that contains all provided credentials and can be used to receive a network object
from the Fabric Service.
|
| Modifier and Type | Method and Description |
|---|---|
X509Certificate |
getCertificate() |
String |
getChannelName() |
byte[] |
getConnectionProfile() |
String |
getMspId() |
PrivateKey |
getPrivateKey() |
String |
getUserName() |
public ChannelService(@Nonnull String userName, @Nonnull String mspId, @Nonnull X509Certificate certificate, @Nonnull PrivateKey privateKey, @Nonnull String channelName, @Nonnull byte[] connectionProfile)
userName - Some name for this usermspId - The MSP ID of the organization for this usercertificate - The X509 certificate for this userprivateKey - The private key for this userchannelName - The name of the Hyperledger Fabric channelconnectionProfile - The common connection profile that contains all the information about the Hyperledger Fabric network.
For more information see
https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/connectionprofile.htmlpublic ChannelService(@Nonnull String userProvidedServiceName)
userProvidedServiceName - The name of the user-provided service (only mandatory if there are multiple user-provided services
bound to the application)IllegalStateException - if the user-provided service with the given name could not be foundIllegalArgumentException - if the user-provided service is not a hyperledger-fabric ChannelService or some credentials are
missing or can not be parsedpublic ChannelService()
IllegalStateException - if there are no or more than one user-provided servicesIllegalArgumentException - if the user-provided service is not a hyperledger-fabric ChannelService or some credentials are
missing or can not be parsed@Nonnull public X509Certificate getCertificate()
@Nonnull public PrivateKey getPrivateKey()
@Nonnull public String getChannelName()
@Nonnull public byte[] getConnectionProfile()
Copyright © 2020 SAP SE. All rights reserved.