Class AmopImp

java.lang.Object
org.fisco.bcos.sdk.amop.AmopImp
All Implemented Interfaces:
Amop

public class AmopImp
extends java.lang.Object
implements Amop
Amop implement
  • Constructor Details

  • Method Details

    • subscribeTopic

      public void subscribeTopic​(java.lang.String topicName, AmopCallback callback)
      Description copied from interface: Amop
      Subscribe a normal topic.
      Specified by:
      subscribeTopic in interface Amop
      Parameters:
      topicName - the topic name
      callback - callback is called when receive a msg relate to this topic
    • subscribePrivateTopics

      public void subscribePrivateTopics​(java.lang.String topicName, KeyTool privateKeyTool, AmopCallback callback)
      Description copied from interface: Amop
      Subscribe a private topic which need verify.
      Specified by:
      subscribePrivateTopics in interface Amop
      Parameters:
      topicName - the topic name
      privateKeyTool - the private key you used to prove your identity.
      callback - callback is called when receive a msg relate to this topic
    • publishPrivateTopic

      public void publishPrivateTopic​(java.lang.String topicName, java.util.List<KeyTool> publicKeyTools)
      Description copied from interface: Amop
      Config a topic which is need verification, after that user can send message to verified subscriber.
      Specified by:
      publishPrivateTopic in interface Amop
      Parameters:
      topicName - the topic name
      publicKeyTools - the public keys of the target organizations that you want to communicate with
    • unsubscribeTopic

      public void unsubscribeTopic​(java.lang.String topicName)
      Description copied from interface: Amop
      Unsubscribe a topic.
      Specified by:
      unsubscribeTopic in interface Amop
      Parameters:
      topicName - the topic name
    • sendAmopMsg

      public void sendAmopMsg​(AmopMsgOut content, AmopResponseCallback callback)
      Description copied from interface: Amop
      Send amop msg
      Specified by:
      sendAmopMsg in interface Amop
      Parameters:
      content - the sent message
      callback - the callback that will be called when receive the AMOP response
    • broadcastAmopMsg

      public void broadcastAmopMsg​(AmopMsgOut content)
      Description copied from interface: Amop
      Send amop msg
      Specified by:
      broadcastAmopMsg in interface Amop
      Parameters:
      content - the broadcasted AMOP message
    • getSubTopics

      public java.util.Set<java.lang.String> getSubTopics()
      Description copied from interface: Amop
      Get all subscribe topics.
      Specified by:
      getSubTopics in interface Amop
      Returns:
      topic name list
    • setCallback

      public void setCallback​(AmopCallback cb)
      Description copied from interface: Amop
      set amop default callback
      Specified by:
      setCallback in interface Amop
      Parameters:
      cb - the amop callback
    • start

      public void start()
      Description copied from interface: Amop
      Start.
      Specified by:
      start in interface Amop
    • stop

      public void stop()
      Description copied from interface: Amop
      Stop.
      Specified by:
      stop in interface Amop
    • sendSubscribe

      public void sendSubscribe()
      Specified by:
      sendSubscribe in interface Amop
    • getAllTopics

      public java.util.Set<java.lang.String> getAllTopics()
    • getTopicManager

      public TopicManager getTopicManager()
      Specified by:
      getTopicManager in interface Amop