code: public Date setDatastreamState(Context context,
                                     String pid,
                                     String dsID,
                                     String dsState,
                                     String logMessage) throws ServerException {
          try {
              CreatorJournalEntry cje =
                      new CreatorJournalEntry(METHOD_SET_DATASTREAM_STATE,
                                              context);
              cje.addArgument(ARGUMENT_NAME_PID, pid);
              cje.addArgument(ARGUMENT_NAME_DS_ID, dsID);
              cje.addArgument(ARGUMENT_NAME_DS_STATE, dsState);
              cje.addArgument(ARGUMENT_NAME_LOG_MESSAGE, logMessage);
              return (Date) cje.invokeAndClose(delegate, writer);
          } catch (JournalException e) {
              throw new GeneralException("Problem creating the Journal", e);
          }
      }
docs: Create a journal entry, add the arguments, and invoke the method.