/* (non-Javadoc)
@see com.ibm.ws.sib.processor.runtime.SIMPDeliveryStreamTransmitControllable#getTransmitMessageByID
425084
public SIMPTransmitMessageControllable getTransmitMessageByID(String id)
  throws SIMPRuntimeOperationFailedException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getTransmitMessageByID", id);
      
    SIMPTransmitMessageControllable transmitMessage = null;
    try
    {
      //we should only get a transmit message if it is still
      //on the stream 
      Iterator<TickRange> messagesOnStream = 
        _sourceStream.getAllMessageItemsOnStream(true).iterator();
      while(messagesOnStream.hasNext())
      {
        long msgStoreId = -1;
        TickRange tr = messagesOnStream.next();
        if(tr.value == null)
        {
          // Only committed msgs have valid ids
          msgStoreId = tr.itemStreamIndex;
        
          if(Long.parseLong(id) == msgStoreId)
            transmitMessage=new LinkTransmitMessageControl(msgStoreId, _sourceStream, _downControl);
        }
      }
    }
    catch (SIResourceException e)
    {
      // No FFDC code needed  
      SibTr.exception(tc, e);
      
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
        SibTr.exit(tc, "getTransmitMessageByID", e);
      throw new SIMPRuntimeOperationFailedException(e);
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getTransmitMessageByID", transmitMessage);
    return transmitMessage;
  }
507937
@Override
    public SmsMessage getSmsMessageBySmppMessageId(final String smppMessageId) {
        final SqlSession session = sessions.openSession();
        try {
            final Map<String, Object> result = session.selectOne(namespace + "getSmsMessageBySmppMessageId", smppMessageId);
            if (result != null) {
                return toSmsMessage(result);
            } else {
                return null;
            }
        } finally {
            session.close();
        }
    }
329433
public MessageId sendWithBinaryData(ProducerConnectionContext context, BasicMessage basicMessage,
            InputStream inputStream) throws JMSException {
        return sendWithBinaryData(context, basicMessage, inputStream, null);
    }
1320674
@Override
	public byte[] getTransIdByte(TransactionId transId) {

		int appIdCode = codecer.findId(APP_ID, transId.getAppId()).intValue();
		int busCodeId = codecer.findId(BUSINESS_CODE, transId.getBusCode()).intValue();

		ByteBuffer byteBuffer = ByteBuffer.allocate(12);
		putUnsignedShort(byteBuffer, appIdCode);
		putUnsignedShort(byteBuffer, busCodeId);
		byteBuffer.putLong(transId.getTrxId());
		
		return byteBuffer.array();
	}
837648
protected byte[] getTransportPayload(AuditEventMessage msg)
	{
		if (msg == null) {
			return null;
		}
		
		byte[] msgBytes = msg.getSerializedMessage(false);
		if (EventUtils.isEmptyOrNull(msgBytes)) {
			return null;
		}
		
		// Format message with transport-specific headers
		StringBuilder sb = new StringBuilder();
		sb.append("<");
		sb.append(TRANSPORT_DEFAULT_PRIORITY);
		sb.append(">");
		
		sb.append(TimestampUtils.getBSDSyslogDate(msg.getDateTime()));
		sb.append(" ");
		sb.append(getSystemHostName());
		sb.append(" ");
		sb.append("<?xml version=\"1.0\" encoding=\"ASCII\"?>");
		sb.append(new String(msgBytes));

		return sb.toString().trim().getBytes();
	}
449489
public String getTransactionId()
  {
    String tranID = null;
    try
    {
      PersistentTranId pTranID = getSIMPMessage().getTransactionId();
      
      if (pTranID != null)
      {
        tranID = pTranID.toTMString(); 
      }
    }
    catch (SIResourceException e)
    {
      // No FFDC code needed  
      SibTr.exception(tc, e);
    }      

    return tranID;
  }
87786
def get_message_type_by_id(self, message_type_id):
        
        self._validate_uuid(message_type_id)

        url = "/notification/v1/message-type/{}".format(message_type_id)
        response = NWS_DAO().getURL(url, self._write_headers())
        if response.status != 200:
            raise DataFailureException(url, response.status, response.data)

        data = json.loads(response.data)
        return self._message_type_from_json(data.get("MessageType"))
53568
public final SIBUuid8 getGuaranteedTargetMessagingEngineUUID() {
    byte[] b = (byte[])jmo.getField(ControlAccess.TARGETMEUUID);
    if (b != null)
      return new SIBUuid8(b);
    return null;
  }
260870
public String getTransactionId() throws SIMPException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getTransactionId");
    
    assertValidControllable();    
    
    String id = null;
    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.getTransactionId",
                          "1:389: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, "getTransactionId", finalE);
      throw finalE;
    } 
    
    if (msg != null)
    {
      PersistentTranId pTranId = msg.getTransactionId();
      if (pTranId != null)
      {
        id = pTranId.toTMString(); 
      }
    }
      
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getTransactionId", id);
    return id;
  }
1055995
public SIMPRemoteQueuePointControllable getRemoteQueuePointControlByID(String id)
    throws SIMPInvalidRuntimeIDException,
           SIMPControllableNotFoundException,
           SIMPException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getRemoteQueuePointControlByID", id);
      
    assertMessageHandlerNotCorrupt();
    SIMPIterator remoteQueuePoints = getRemoteQueuePointIterator();
    SIMPRemoteQueuePointControllable rqp = null;
    while(remoteQueuePoints.hasNext())
    {
      SIMPXmitPoint nextRqp = (SIMPXmitPoint)remoteQueuePoints.next();
       String rqpID = nextRqp.getId();
       if(id.equals(rqpID))
       {
         //we have found it
         rqp = (SIMPRemoteQueuePointControllable) nextRqp;
         break; 
       }
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getRemoteQueuePointControlByID", rqp);
    return rqp;
  }
1018246
public SerialMessage getValueMessage() {
		logger.debug("Creating new message for application command BASIC_GET for node {}", this.getNode().getNodeId());
		SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.ApplicationCommandHandler, SerialMessagePriority.Get);
    	byte[] newPayload = { 	(byte) this.getNode().getNodeId(), 
    							2, 
								(byte) getCommandClass().getKey(), 
								(byte) BASIC_GET };
    	result.setMessagePayload(newPayload);
    	return result;		
	}
468978
SimpleProxyId<BaseProxy> getId(final IdMessage op) {
    if (Strength.SYNTHETIC.equals(op.getStrength())) {
      return this.allocateSyntheticId(op.getTypeToken(), op.getSyntheticId());
    }
    return this.state.requestFactory.getId(op.getTypeToken(), op.getServerId(), op.getClientId());
  }
1187030
public SIMPIterator getTransmitMessagesIterator(int maxMsgs) throws SIMPControllableNotFoundException, SIMPRuntimeOperationFailedException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getTransmitMessagesIterator");

    assertValidControllable();

    SIMPIterator msgItr = null;
    try
    {
      msgItr = new SourceStreamSetXmitMessageIterator(maxMsgs);
    }
    catch (SIResourceException e)
    {
      FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.runtime.SourceStreamSetControl.getTransmitMessagesIterator",
          "1:283:1.39",
          this);

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

        SibTr.exception(tc, finalE);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getTransmitMessagesIterator", finalE);
        throw finalE;
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getTransmitMessagesIterator", msgItr);

    return msgItr;
  }
860221
public String getId()
  {
    try
    {
      if(id == null) 
        id = ""+itemStream.getID();
    }
    catch(MessageStoreException e)
    {
      // FFDC
      FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.runtime.XmitPointControl.getId",
          "1:136:1.17", 
          this);
      
      SibTr.exception(tc, e);
    }
    return id;
  }
659488
@Override
	public Result<Void> getCertInfoByID(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp, String id) {
		TimeTaken tt = trans.start(GET_CERT_BY_ID, Env.SUB|Env.ALWAYS);
		try {	
			Result<CERTS> rci = service.getCertInfoByID(trans,req,id);
			
			switch(rci.status) {
				case OK: 
					if(Question.willSpecialLog(trans, trans.user())) {
						RosettaData<CERTS> data = certsDF.newData(trans).load(rci.value);
						Question.logEncryptTrace(trans,data.asString());
						data.to(resp.getOutputStream());
					} else {
						certsDF.direct(trans, rci.value, resp.getOutputStream());
					}
					setContentType(resp,certsDF.getOutType());
					return Result.ok();
				default:
					return Result.err(rci);
			}
		} catch (Exception e) {
			trans.error().log(e,IN,GET_CERT_BY_ID);
			return Result.err(e);
		} finally {
			tt.done();
		}
	}
81501
public synchronized AbstractMessage getMEMEMessage() throws Exception {
        if (tc.isEntryEnabled())
            SibTr.entry(this, tc, "getMEMEMessage");

        // GRRRRRRRRRRRR Read the FAP Clifford
        int messageLength = getInt();
        boolean isControlMessage = get() == CommsConstants.MEME_CONTROLMESSAGE;
        AbstractMessage message = null;

        if (tc.isDebugEnabled()) {
            SibTr.debug(tc, "Message Length", messageLength);
            SibTr.debug(tc, "Control Message", "" + isControlMessage);
        }

        if (isControlMessage) {
            ControlMessageFactory fac = ControlMessageFactory.getInstance();
            if (receivedBuffer.hasArray()) {
                message = fac.createInboundControlMessage(receivedBuffer.array(),
                                                          receivedBuffer.position() + receivedBuffer.arrayOffset(),
                                                          messageLength);
            } else {
                byte[] messageArray = get(messageLength);

                message = fac.createInboundControlMessage(messageArray,
                                                          0,
                                                          messageLength);
            }
        } else {
            JsMessageFactory fac = JsMessageFactory.getInstance();
            if (receivedBuffer.hasArray()) {
                message = fac.createInboundJsMessage(receivedBuffer.array(),
                                                     receivedBuffer.position() + receivedBuffer.arrayOffset(),
                                                     messageLength);
            } else {
                byte[] messageArray = get(messageLength);

                message = fac.createInboundJsMessage(messageArray,
                                                     0,
                                                     messageLength);
            }
        }

        if (tc.isEntryEnabled())
            SibTr.exit(this, tc, "getMEMEMessage", message);
        return message;
    }
688505
public String getMessageId() {
        return (data != null && data.payload != null) ? data.payload.messageId : null;
    }