SHARE
TWEET

Untitled

a guest Mar 19th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ConfigFileAuthenticationDetailsProvider provider =  new ConfigFileAuthenticationDetailsProvider('/path/to/.oci/config', 'DEFAULT')
  2. StreamClient client = new StreamClient(provider)
  3. String key = 'Key'
  4. String msg = 'Message'
  5.  
  6. PutMessagesDetails putMessageDetails = PutMessagesDetails.builder()
  7.     .messages([
  8.         PutMessagesDetailsEntry.builder()
  9.             .key(key.getBytes(Charset.forName("UTF-8")))
  10.             .value(msg.getBytes(Charset.forName("UTF-8")))
  11.             .build()
  12.     ])
  13.     .build()
  14. PutMessagesRequest putMessageRequest = PutMessagesRequest.builder()
  15.     .streamId(this.streamId)
  16.     .putMessagesDetails(putMessageDetails)
  17.     .build()
  18. client.putMessages(putMessageRequest)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top