/* (non-Javadoc)
@see com.ibm.ws.sib.processor.runtime.SIMPDeliveryReceiverControllable#getStreamState()
508442
public StreamState getStreamState()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getStreamState");  
    StreamState returnValue = aiStream.getStreamState();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getStreamState", returnValue);
    return returnValue;  
  }
443960
@Override
    public InputStream getInputStream() throws IOException, IllegalStateException {
        if (this.read) {
            throw new IllegalStateException("InputStream has already been read - " +
                    "do not use InputStreamResource if a stream needs to be read multiple times");
        }
        this.read = true;
        return this.inputStream;
    }
1324518
public ItemStream getMQLinkStateItemStream() 
  {    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getMQLinkStateItemStream");
      SibTr.exit(tc, "getMQLinkStateItemStream", _mqLinkStateItemStream);
    }    
    return _mqLinkStateItemStream;
  }
1093926
@Override
    public final JsHealthState getHealthState()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(this, tc, "getHealthState");
            SibTr.exit(this, tc, "getHealthState", "return=" + _healthState);
        }
        return _healthState;
    }
142629
public boolean getState()
    {
        if (this.getData() == null)
            return m_bTrueIfNull;
        int fieldValue = (int)this.getValue();
        boolean returnValue = false;
        if ((fieldValue & (1 << m_iBitNumber)) != 0)
            returnValue = true;
        if (m_bTrueIfMatch)
            return returnValue;
        else
            return !returnValue;
    }
312647
public synchronized InputStream getInputStream(int stream) {
    if (state == State.CLOSED) throw new IllegalStateException();

    if (!input.containsKey(stream)) {
      try {
        PipedInputStream pipeIn = new PipedInputStream();
        PipedOutputStream pipeOut = new PipedOutputStream(pipeIn);
        pipedOutput.put(stream, pipeOut);
        input.put(stream, pipeIn);
      } catch (IOException ex) {
        // This is _very_ unlikely, as it requires the above constructor to fail.
        // don't force callers to catch, but still throw
        throw new IllegalStateException(ex);
      }
    }
    return input.get(stream);
  }
1172053
public String getState()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getState"); 
    String state = messageProcessor.getDestinationManager().getLinkIndex().getState(baseDest).toString();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getState", state); 
    return state;
  }
239436
public InputStream getAsStream() throws CacheException {
		InputStream stream = null;
		try {
			logger.debug("opening connection...");
			stream = url.openConnection(proxy != null ? proxy : Proxy.NO_PROXY).getInputStream();
			if(stream == null) {
				logger.error("error opening stream");
			} else {
				logger.debug("stream opened");
			}
		} catch(IOException e) {
			logger.error("error accessing url '{}'", url);
			throw new CacheException("error accessing url " + url, e);
		}
		return stream;
	}
470461
public static int streamableBytes(StreamByteDistributor.StreamState state) {
        return max(0, (int) min(state.pendingBytes(), state.windowSize()));
    }
101890
public SIMPIterator getStreams() throws SIMPControllableNotFoundException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getStreams");

    assertValidControllable();

    Iterator it = null;
    try
    {
      it = _streamSet.iterator();
    }
    catch (SIResourceException e)
    {
      FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.runtime.SourceStreamSetControl.getStreams",
          "1:713:1.39",
          this);

        SIMPRuntimeOperationFailedException finalE =
          new SIMPRuntimeOperationFailedException(
            nls.getFormattedMessage(
              "INTERNAL_MESSAGING_ERROR_CWSIP0002",
              new Object[] {"SourceStreamSetControl.getStreams",
                  "1:721:1.39",
                            e},
              null), e);

        SibTr.exception(tc, finalE);
//        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getStreams", finalE);
//        throw finalE;
    }
    SIMPIterator returnIterator=new SourceStreamControllableIterator(it);
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getStreams", returnIterator);
    return returnIterator;
  }
452902
public APIState getAPIState() {
		APIStateRequest request = new APIStateRequest();
		APIStateResponse response = resolveApitraryClient().send(request);

		APIState apiState = null;
		if (HttpStatus.OK.ordinal() == response.getStatusCode()) {
			String result = response.getResult();

			ObjectMapper objectMapper = new ObjectMapper();
			try {
				apiState = objectMapper.readValue(result, APIState.class);
			} catch (Exception e) {
				throw new MappingException(e);
			}
		} else {
			throw new CommunicationErrorException(HttpStatus.getStatus(response.getStatusCode()));
		}
		return apiState;
	}
418662
public @Nullable InputStream getInputStream() {
    if (mInputStreamSupplier != null) {
      return mInputStreamSupplier.get();
    }
    CloseableReference<PooledByteBuffer> pooledByteBufferRef =
        CloseableReference.cloneOrNull(mPooledByteBufferRef);
    if (pooledByteBufferRef != null) {
      try {
        return new PooledByteBufferInputStream(pooledByteBufferRef.get());
      } finally {
        CloseableReference.closeSafely(pooledByteBufferRef);
      }
    }
    return null;
  }
576464
protected <S extends State> S getPartitionedState(StateDescriptor<S, ?> stateDescriptor) throws Exception {
		return getPartitionedState(VoidNamespace.INSTANCE, VoidNamespaceSerializer.INSTANCE, stateDescriptor);
	}
706968
public ReadyState getReadyState() {
        if (stream == null) {
            return EventSource.ReadyState.CONNECTING;
        }
        else {
            switch (stream.getReadyState()) {
            case CONNECTING:
                return EventSource.ReadyState.CONNECTING;
                
            case OPEN:
                return EventSource.ReadyState.OPEN;

            case CLOSING:
            case CLOSED:
            default:
                return EventSource.ReadyState.CLOSED;
            }
        }        
    }
465163
@Override
    public RelayState getState() {
        if(pin.isState(openState))
            return RelayState.OPEN;
        else
            return RelayState.CLOSED;
    }
1124566
public TransitionableState getState(final Flow flow, final String stateId) {
        return getState(flow, stateId, TransitionableState.class);
    }
1171217
public ServletOutputStream getOutputStream() {
        final boolean isTraceOn = com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled();
        if (isTraceOn&&logger.isLoggable (Level.FINE))  //306998.15
            logger.entering(CLASS_NAME,"getOutputStream","gotWriter="+String.valueOf(_gotWriter)+" ["+this+"]");

        if (!_ignoreStateErrors && _gotWriter) {

            if (isTraceOn&&logger.isLoggable (Level.FINE))  //306998.15
                logger.exiting(CLASS_NAME,"getOutputStream","throw IllegalStateException");

            throw new IllegalStateException(nls.getString("Writer.already.obtained", "Writer already obtained"));
        }

        //PK89810 Start
        if(!(WCCustomProperties.FINISH_RESPONSE_ON_CLOSE) || ! _gotOutputStream)                
        {
            _gotOutputStream = true;

            // LIBERTY _bufferedOut.init(_rawOut, getBufferSize());
            // LIBERTY _bufferedOut.setLimit(_contentLength);
            // LIBERTY _bufferedOut.setResponse(_response);
            // LIBERTY _responseBuffer = _bufferedOut;
        } //PK89810 End
        this.fireOutputStreamRetrievedEvent(_bufferedOut);

        if (isTraceOn&&logger.isLoggable (Level.FINE))  //306998.15
            logger.exiting(CLASS_NAME,"getOutputStream");

        return _bufferedOut;
    }