<p>
Get the RI (ring-indicator) pin state.
</p>

@throws IllegalStateException thrown if the serial port is not already open.
@throws IOException thrown on any error.
490360
public boolean getRI() throws IllegalStateException, IOException{
        // validate state
        if (isClosed())
            throw new IllegalStateException("Serial connection is not open; cannot 'getRI()'.");

        // get pin state
        return com.pi4j.jni.Serial.getRI(fileDescriptor);
    }
162423
private String getOldCodeId(FileStatus srcStat ) throws IOException {
    if (codec.id.equals("xor") || codec.id.equals("rs")) {
      return codec.id;
    } else {
      // Search for xor/rs parity files
      if (ParityFilePair.getParityFile(
        Codec.getCodec("xor"), srcStat, this.conf) != null)
        return "xor";
      if (ParityFilePair.getParityFile(
        Codec.getCodec("rs"), srcStat, this.conf) != null)
        return "rs";
    }
    return null;
  }
432645
public int getHTTPStatus() throws InterruptedException, BOSHException {
        if (toThrow != null) {
            throw(toThrow);
        }
        lock.lock();
        try {
            if (!sent) {
                awaitResponse();
            }
        } finally {
            lock.unlock();
        }
        return statusCode;
    }
659637
public DeviceControllerDeviceStatus getDeviceStatus() throws IOException {

		// get status from device
		int deviceStatus = read(MEMADDR_STATUS);

		// check formal criterias
		int reservedValue = deviceStatus & STATUS_RESERVED_MASK;
		if (reservedValue != STATUS_RESERVED_VALUE) {
			throw new IOException(
					"status-bits 4 to 8 must be 1 according to documentation chapter 4.2.2.1. got '"
					+ Integer.toString(reservedValue, 2)
					+ "'!");
		}

		// build the result
		boolean eepromWriteActive
				= (deviceStatus & STATUS_EEPROM_WRITEACTIVE_BIT) > 0;
		boolean eepromWriteProtection
		 		= (deviceStatus & STATUS_EEPROM_WRITEPROTECTION_BIT) > 0;
		boolean wiperLock0
				= (deviceStatus & STATUS_WIPERLOCK0_BIT) > 0;
		boolean wiperLock1
				= (deviceStatus & STATUS_WIPERLOCK1_BIT) > 0;

		return new DeviceControllerDeviceStatus(
				eepromWriteActive, eepromWriteProtection,
				wiperLock0, wiperLock1);

	}
406554
@Override
    public int getStatus() {
        int state = Status.STATUS_UNKNOWN;

        switch (_status.getState()) {
            case TransactionState.STATE_NONE:
                state = Status.STATUS_NO_TRANSACTION;
                break;
            case TransactionState.STATE_ACTIVE:
                if (_rollbackOnly)
                    state = Status.STATUS_MARKED_ROLLBACK;
                else
                    state = Status.STATUS_ACTIVE;
                break;
            case TransactionState.STATE_PREPARING:
            case TransactionState.STATE_LAST_PARTICIPANT:
                state = Status.STATUS_PREPARING;
                break;
            case TransactionState.STATE_PREPARED:
                state = Status.STATUS_PREPARED;
                break;
            case TransactionState.STATE_COMMITTING:
            case TransactionState.STATE_COMMITTING_ONE_PHASE:
                state = Status.STATUS_COMMITTING;
                break;
            case TransactionState.STATE_HEURISTIC_ON_COMMIT:
            case TransactionState.STATE_COMMITTED:
                state = Status.STATUS_COMMITTED;
                break;
            case TransactionState.STATE_ROLLING_BACK:
                state = Status.STATUS_ROLLING_BACK;
                break;
            case TransactionState.STATE_HEURISTIC_ON_ROLLBACK:
            case TransactionState.STATE_ROLLED_BACK:
                state = Status.STATUS_ROLLEDBACK;
                break;
        }

        if (tc.isDebugEnabled())
            Tr.debug(tc, "getStatus (SPI)", Util.printStatus(state));
        return state;
    }
176756
public BigInteger getSerialNumber() {
        SerialNumber ser = getSerialNumberObject();

        return ser != null ? ser.getNumber() : null;
    }
1118925
private int getPort()
        throws BundleException
    {
        // The port is usually given by starting client (owner of this process).
        try
        {
            return Integer.parseInt( System.getProperty( Constants.RMI_PORT_PROPERTY ) );
        }
        catch( NumberFormatException e )
        {
            throw new BundleException(
                "Cannot determine rmi registry port. Ensure that property "
                + Constants.RMI_PORT_PROPERTY
                + " is set to a valid Integer."
            );
        }
    }
1318018
@Override
	public final byte get(int index) {
		final long pos = address + index;
		if (index >= 0 && pos < addressLimit) {
			return UNSAFE.getByte(heapMemory, pos);
		}
		else if (address > addressLimit) {
			throw new IllegalStateException("segment has been freed");
		}
		else {
			// index is in fact invalid
			throw new IndexOutOfBoundsException();
		}
	}
874650
public static DeviceApplyStatusResult deviceApplyStatus(String accessToken,
                                                            DeviceApplyStatus deviceApplyStatus) {
        return deviceApplyStatus(accessToken,
                JsonUtil.toJSONString(deviceApplyStatus));
    }
347104
private static int getOpenPort() throws IOException {
        Log.info(c, "getOpenPort", "Entry.");
        ServerSocket s = new ServerSocket(0);
        Log.info(c, "getOpenPort", "Got socket.");
        int port = s.getLocalPort();
        Log.info(c, "getOpenPort", "Got port " + s);
        s.close();
        Log.info(c, "getOpenPort", "Close socket");
        return port;
    }
1019737
public static synchronized UTEHelper getHelperInstance()
   throws java.lang.IllegalStateException
  {
    
    if (tcInt.isEntryEnabled()) SibTr.entry(tcInt, "getHelperInstance");
    
    // ************** CHECK TO SEE IF IT IS ENABLED *******************
    try
    {      
      // Initialise the test env flag from a system property if it has been set.
      String prop = System.getProperty("com.ibm.ws.sib.api.testenv");

      // Check that the text reads "enabled".      
      if ((prop != null) && ("enabled".equals(prop.toLowerCase())))
      {
        if (tcInt.isDebugEnabled())
          SibTr.debug(tcInt, "TestEnv flag enabled by system property.");
        UTEHelperFactory.jmsTestEnvironmentEnabled = true;
    
      } else
      {
        if (tcInt.isDebugEnabled())
           SibTr.debug(tcInt, "testenv system property was present but did not enable testenv - "+prop);
      }//if
  
    } catch(SecurityException sce)
    {
      // No FFDC code needed
      if (tcInt.isDebugEnabled())
        SibTr.debug(tcInt, "Could not read system property due to SecurityException", sce);
    
    }//try
    
    
    // d250397 IGH it is valid to use a UTEHelper with UTE disabled
    // when running unit tests in remote client mode (see JMSTestCase)
    // so don't throw an exception here
/*
    if (!UTEHelperFactory.jmsTestEnvironmentEnabled) 
    {
      // NB. This is for unit test only and so need not be NLS'd.
      throw new java.lang.IllegalStateException("JMS Test Environment is not enabled.");
      
    }//if
*/    

    if (instance == null)
    {
      try
      {
        instance = (UTEHelper)Class.forName(
         "com.ibm.ws.sib.api.jms.impl.ute.UTEHelperImpl").newInstance();
      } catch (Exception e)
      {
        // No FFDC code needed
        if (tcInt.isDebugEnabled())
          SibTr.debug(tcInt, "Couldn't find impl class", e);
          
        RuntimeException f = new java.lang.IllegalStateException("UTEHelperFactory.getHelperInstance()");
        f.initCause(e);
        
        if (tcInt.isEntryEnabled()) SibTr.exit(tcInt, "getHelperInstance");
        throw f;
      }
    }
    
    if (tcInt.isEntryEnabled()) SibTr.exit(tcInt, "getHelperInstance");
    return instance;
    
  }
629754
SICoreConnectionFactory getCoreFactory()
            throws ResourceAdapterInternalException {

        if (TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "getCoreFactory");
        }

        if (_coreFactory == null) {
            try {

                _coreFactory = SICoreConnectionFactorySelector
                        .getSICoreConnectionFactory(FactoryType.TRM_CONNECTION);

            } catch (SIException exception) {

                FFDCFilter
                        .processException(
                                exception,
                                "com.ibm.ws.sib.ra.impl.SibRaManagedConnectionFactory.getCoreFactory",
                                FFDC_PROBE_1, this);
                if (TRACE.isEventEnabled()) {
                    SibTr.exception(this, TRACE, exception);
                }
                throw new ResourceAdapterInternalException(NLS
                        .getFormattedMessage(
                                "CONNECTION_FACTORY_ERROR_CWSIV0350",
                                new Object[] { exception }, null), exception);

            } catch (SIErrorException exception) {

                FFDCFilter
                        .processException(
                                exception,
                                "com.ibm.ws.sib.ra.impl.SibRaManagedConnectionFactory.getCoreFactory",
                                FFDC_PROBE_4, this);
                if (TRACE.isEventEnabled()) {
                    SibTr.exception(this, TRACE, exception);
                }
                throw new ResourceAdapterInternalException(NLS
                        .getFormattedMessage(
                                "CONNECTION_FACTORY_ERROR_CWSIV0350",
                                new Object[] { exception }, null), exception);

            }
        }

        if (TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, "getCoreFactory", _coreFactory);
        }
        return _coreFactory;

    }
1096080
public static void illegalStateIf(boolean tester, String msg, Object... args) {
        if (tester) {
            throw new IllegalStateException(S.fmt(msg, args));
        }
    }
668384
public static io.opencensus.trace.Status fromGrpcStatus(io.grpc.Status grpcStatus) {
    io.opencensus.trace.Status status = opencensusStatusFromGrpcCode(grpcStatus.getCode());
    String description = grpcStatus.getDescription();
    if (description != null) {
      status = status.withDescription(description);
    }
    return status;
  }
308028
public String getState() throws SIMPException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getState");

    String state = State.UNLOCKED;
    
    assertValidControllable();
    SIMPMessage msg = null;
    try
    {
      msg = getSIMPMessage();
    }
    catch (SIResourceException e)
    {
      // No FFDC code needed    
      SIMPRuntimeOperationFailedException finalE =
        new SIMPRuntimeOperationFailedException(
          nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0003",
            new Object[] {"QueuedMessage.getState",
                          "1:288:1.66",
                          e,
                          Long.toString(_messageID)},
            null), e,
            "INTERNAL_MESSAGING_ERROR_CWSIP0003", new Object[] {Long.toString(_messageID)});
  
      SibTr.exception(tc, finalE);
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
        SibTr.exit(tc, "getState", finalE);
      throw finalE;
    }
    
    if(msg!=null)  
    {
      //defect 262036: locked messages are displayed as locked, but so 
      //are messages that are no longer available 
      //e.g. messages being removed
      AbstractItem msgItem = (AbstractItem)msg;
      if(!msgItem.isAvailable())
      {
        // This message is locked because a consumer (MDB probably) has
        // hidden it due to repeated failures to process it.
        if(msg.isHidden())
          state = State.PENDING_RETRY;         
        // It's being added under a tran (probably already in prepare)
        else if(msgItem.isAdding())
          state = State.COMMITTING;
        // It's being deleted under a tran
        else if(msgItem.isRemoving())
          state = State.REMOVING;
        // It's currently locked for a remote getter
        else if(msgItem.isPersistentlyLocked())
          state = State.REMOTE_LOCKED;
        else
          state = State.LOCKED;
      }
      else
      {
        // Even if the mesage looks available, the whole stream may be blocked
        // by a ConsumerDispatcher due to a failing message not being exceptioned
        // so this mesasge is actually unavailable for the time being
        if(isStreamBlocked())
          state = State.BLOCKED;
      }
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getState", state);
    return state;
  }
849838
public int status()
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "status", this);
        if (tc.isEntryEnabled())
            Tr.exit(tc, "status", new Integer(_status));
        return _status;
    }
747431
public boolean getRTS() throws IllegalStateException, IOException{
        // validate state
        if (isClosed())
            throw new IllegalStateException("Serial connection is not open; cannot 'getRTS()'.");

        // get pin state
        return com.pi4j.jni.Serial.getRTS(fileDescriptor);
    }