congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
GenericParser.getCriticalResponseData
Code IndexAdd Tabnine to your IDE (free)

How to use
getCriticalResponseData
method
in
ca.uhn.hl7v2.parser.GenericParser

Best Java code snippets using ca.uhn.hl7v2.parser.GenericParser.getCriticalResponseData (Showing top 2 results out of 315)

origin: ca.uhn.hapi/hapi-base

/**
 * Generates an empty response message. This class generates an
 * ACKnowledgement using the code returned by {@link #getSuccessAcknowledgementCode()}.
 * 
 * @param request request message, either a {@link String} or a
 *            {@link Message}
 * @return acknowledgment to the request
 * @throws HL7Exception
 */
protected Message generateResponseMessage(Object request) throws HL7Exception {
  try {
    Message in;
    if (request instanceof String) {
      Segment s = getHapiContext().getGenericParser().getCriticalResponseData(
          (String)request);
      in = s.getMessage();
      DeepCopy.copy(s, (Segment) in.get("MSH"));
    } else if (request instanceof Message) {
      in = (Message) request;
    } else {
      throw new HL7Exception("Validated message must be either Message or String");
    }
    return in.generateACK(getSuccessAcknowledgementCode(), null);
  } catch (IOException e) {
    throw new HL7Exception(e);
  }
}
origin: ca.uhn.hapi/hapi-osgi-base

/**
 * Generates an empty response message. This class generates an
 * ACKnowledgement using the code returned by {@link #getSuccessAcknowledgementCode()}.
 * 
 * @param request request message, either a {@link String} or a
 *            {@link Message}
 * @return acknowledgment to the request
 * @throws HL7Exception
 */
protected Message generateResponseMessage(Object request) throws HL7Exception {
  try {
    Message in;
    if (request instanceof String) {
      Segment s = getHapiContext().getGenericParser().getCriticalResponseData(
          (String)request);
      in = s.getMessage();
      DeepCopy.copy(s, (Segment) in.get("MSH"));
    } else if (request instanceof Message) {
      in = (Message) request;
    } else {
      throw new HL7Exception("Validated message must be either Message or String");
    }
    return in.generateACK(getSuccessAcknowledgementCode(), null);
  } catch (IOException e) {
    throw new HL7Exception(e);
  }
}
ca.uhn.hl7v2.parserGenericParsergetCriticalResponseData

Javadoc

Returns a minimal amount of data from a message string, including only the data needed to send a response to the remote system. This includes the following fields:

  • field separator
  • encoding characters
  • processing ID
  • message control ID
This method is intended for use when there is an error parsing a message, (so the Message object is unavailable) but an error message must be sent back to the remote system including some of the information in the inbound message. This method parses only that required information, hopefully avoiding the condition that caused the original error.

Popular methods of GenericParser

  • <init>
    Creates a new instance of GenericParser
  • parse
  • encode
  • getAppropriateParser
    Checks the encoding of the message using getEncoding(), and returns the corresponding parser (either
  • getEncoding
    Returns a String representing the encoding of the given message, if the encoding is recognized. For
  • setPipeParserAsPrimary
    Sets the underlying PipeParser as the primary parser, so that subsequent calls to encode() will retu
  • setValidationContext
  • compile
  • setListener

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now