returns the actual message implementation object if msg is
Proxy ... this method ignores any message is owned by other than SIB.
777984
private Message getMessageFromProxy(Message msg) {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getMessageFromProxy", msg);

        try {
            if (msg instanceof Proxy) {
                //check whether proxy is type of our InvocationHanlder.
                InvocationHandler handler = Proxy.getInvocationHandler(msg);

                //deal only with our handlers.. other Proxy handlers.. leave as it is..
                if (handler instanceof MessageProxyInvocationHandler) {
                    msg = ((MessageProxyInvocationHandler) handler).getMessage();

                }
            }

        } catch (Exception e) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(this, tc, "Exception in getMessageFromProxy .. returning msg as it is", e);

        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getMessageFromProxy", msg);

        return msg;

    }
784648
def handleOneClientMsg(self, wrappedMsg):
        
        try:
            vmsg = self.validateClientMsg(wrappedMsg)
            if vmsg:
                self.unpackClientMsg(*vmsg)
        except BlowUp:
            raise
        except Exception as ex:
            msg, frm = wrappedMsg
            friendly = friendlyEx(ex)
            if isinstance(ex, SuspiciousClient):
                self.reportSuspiciousClient(frm, friendly)

            self.handleInvalidClientMsg(ex, wrappedMsg)
568214
def get_deprecated_msg(self, wrapped, instance):
        
        if instance is None:
            if inspect.isclass(wrapped):
                fmt = "Call to deprecated class {name}."
            else:
                fmt = "Call to deprecated function (or staticmethod) {name}."
        else:
            if inspect.isclass(instance):
                fmt = "Call to deprecated class method {name}."
            else:
                fmt = "Call to deprecated method {name}."
        if self.reason:
            fmt += " ({reason})"
        if self.version:
            fmt += " -- Deprecated since version {version}."
        return fmt.format(name=wrapped.__name__,
                          reason=self.reason or "",
                          version=self.version or "")
1089745
def is_type(msg_type, msg):
        
        for prop in MessageType.FIELDS[msg_type]["must"]:
            if msg.get(prop, False) is False:
                return False
        for prop in MessageType.FIELDS[msg_type]["prohibit"]:
            if msg.get(prop, False) is not False:
                return False

        return True
966729
@Override
    public Class<?> getProxyClass() {
        if (proxyClass != null) {
            return proxyClass;
        }
        try {
            if (StringUtils.isNotBlank(interfaceId)) {
                this.proxyClass = ClassUtils.forName(interfaceId);
                if (!proxyClass.isInterface()) {
                    throw ExceptionUtils.buildRuntime("service.interfaceId",
                        interfaceId, "interfaceId must set interface class, not implement class");
                }
            } else {
                throw ExceptionUtils.buildRuntime("service.interfaceId",
                    "null", "interfaceId must be not null");
            }
        } catch (SofaRpcRuntimeException e) {
            throw e;
        } catch (Throwable e) {
            throw new SofaRpcRuntimeException(e.getMessage(), e);
        }
        return proxyClass;
    }
518550
def handleMethodCallMessage(self, msg):
        
        if (
            msg.interface == 'org.freedesktop.DBus.Peer'
            and msg.member == 'Ping'
        ):
            r = message.MethodReturnMessage(
                msg.serial,
                destination=msg.sender,
            )

            self.conn.sendMessage(r)
            return

        if (
                msg.interface == 'org.freedesktop.DBus.Introspectable'
                and msg.member == 'Introspect'
        ):
            xml = introspection.generateIntrospectionXML(
                msg.path,
                self.exports,
            )

            if xml is not None:
                r = message.MethodReturnMessage(
                    msg.serial,
                    body=[xml],
                    destination=msg.sender,
                    signature='s',
                )

                self.conn.sendMessage(r)

                return

        # Try to get object from complete object path
        o = self.exports.get(msg.path, None)
        if o is None:
            self._send_err(
                msg,
                'org.freedesktop.DBus.Error.UnknownObject',
                '%s is not an object provided by this process.' % (msg.path),
            )
            return

        if (
                msg.interface == 'org.freedesktop.DBus.ObjectManager'
                and msg.member == 'GetManagedObjects'
        ):
            i_and_p = self.getManagedObjects(o.getObjectPath())

            r = message.MethodReturnMessage(
                msg.serial,
                body=[i_and_p],
                destination=msg.sender,
                signature='a{oa{sa{sv}}}',
            )

            self.conn.sendMessage(r)

            return

        i = None

        for x in o.getInterfaces():
            if msg.interface:
                if x.name == msg.interface:
                    i = x
                    break
            else:
                if msg.member in x.methods:
                    i = x
                    break

        m = None
        if i:
            m = i.methods.get(msg.member, None)

        if m is None:
            self._send_err(
                msg,
                'org.freedesktop.DBus.Error.UnknownMethod',
                (
                    'Method "%s" with signature "%s" on interface "%s" '
                    'doesn\'t exist'
                ) % (
                    msg.member, msg.signature or '',
                    msg.interface or '(null)',
                ),
            )

            return

        msig = msg.signature if msg.signature is not None else ''
        esig = m.sigIn if m.sigIn is not None else ''

        if esig != msig:
            self._send_err(
                msg,
                'org.freedesktop.DBus.Error.InvalidArgs',
                'Call to %s has wrong args (%s, expected %s)' %
                (msg.member, msg.signature or '', m.sigIn or '')
            )
            return

        d = defer.maybeDeferred(
            o.executeMethod,
            i,
            msg.member,
            msg.body,
            msg.sender,
        )

        if msg.expectReply:
            def send_reply(return_values):
                if isinstance(return_values, (list, tuple)):
                    if m.nret == 1:
                        return_values = [return_values]
                else:
                    return_values = [return_values]

                r = message.MethodReturnMessage(
                    msg.serial,
                    body=return_values,
                    destination=msg.sender,
                    signature=m.sigOut,
                )
                self.conn.sendMessage(r)

            def send_error(err):
                e = err.value
                errMsg = err.getErrorMessage()
                name = None

                if hasattr(e, 'dbusErrorName'):
                    name = e.dbusErrorName

                if name is None:
                    name = 'org.txdbus.PythonException.' + e.__class__.__name__

                try:
                    marshal.validateErrorName(name)
                except error.MarshallingError:
                    errMsg = ('!!(Invalid error name "%s")!! ' % name) + errMsg
                    name = 'org.txdbus.InvalidErrorName'

                r = message.ErrorMessage(name, msg.serial,
                                         body=[errMsg],
                                         signature='s',
                                         destination=msg.sender)
                self.conn.sendMessage(r)

            d.addCallback(send_reply)
            d.addErrback(send_error)
569128
def receive(self, msg):
        '''
        
        '''
        handler = getattr(self, 'receive_' + msg.__class__.__name__.lower(), None)
        if handler is None:
            raise InvalidMessageError('Receiving class does not support messages of type: ' + msg.__class__.__name__)
        return handler(msg)
1301572
def _messageFromSender(self, sender, messageID):
        
        return self.store.findUnique(
            _QueuedMessage,
            AND(_QueuedMessage.senderUsername == sender.localpart,
                _QueuedMessage.senderDomain == sender.domain,
                _QueuedMessage.messageID == messageID),
            default=None)
1004093
@Override
    public ProxyBuilder<T> setMessagingQos(final MessagingQos messagingQos) {
        if (messagingQos.getRoundTripTtl_ms() > maxMessagingTtl) {
            logger.warn("Error in MessageQos. domains: {} interface: {} Max allowed ttl: {}. Passed ttl: {}",
                        domains,
                        interfaceName,
                        maxMessagingTtl,
                        messagingQos.getRoundTripTtl_ms());
            messagingQos.setTtl_ms(maxMessagingTtl);
        }

        this.messagingQos = messagingQos;
        return this;
    }
852431
def messaging(self):
        
        if self._messaging is None:
            from twilio.rest.messaging import Messaging
            self._messaging = Messaging(self)
        return self._messaging
74104
@Override
    public UndeliverableReturnCode handleUndeliverableMessage(
                                                              SIMPMessage msg,
                                                              int exceptionReason,
                                                              String[] exceptionInserts,
                                                              TransactionCommon tran)
                    throws
                    SIResourceException
    {
        // F001333-14610
        // Delegate down onto the new method passing a null
        // subscription ID.
        return handleUndeliverableMessage(msg, exceptionReason, exceptionInserts, tran, null);
    }
1024869
def _is_msg(self, msg):
        
        if not msg or len(msg) < self.prefix_len:
            return False
        length = self._extract_len(msg[:self.prefix_len])
        msg_type = msg[self.prefix_len:].split(' ', 1)[0]
        if length == len(msg[self.prefix_len:]) and msg_type in self.msg_types:
            return True
        return False
174529
public boolean isMessagingEngine () {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "isMessagingEngine");

    boolean rc = (this instanceof MessagingEngine);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "isMessagingEngine", Boolean.valueOf(rc));
    return rc;
  }
690795
private List<ProxyMessage> createProxyMessages(final Page<String> messages) {
        final List<ProxyMessage> proxyMsgs = new ArrayList<>(messages.getNumberOfElements());

        Long idx = messages.getNumber() * ((long) messages.getSize());
        for (final String msg : messages) {
            idx++;
            final ProxyMessage proxyMsg = new ProxyMessage();
            proxyMsg.setMessage(msg);
            proxyMsg.setId(String.valueOf(idx));
            proxyMsgs.add(proxyMsg);
        }

        if (messages.getTotalElements() == 1L && StringUtils.isEmpty(proxyMsgs.get(0).getMessage())) {
            proxyMsgs.get(0).setMessage(noMessageText);
        }

        return proxyMsgs;
    }
836020
private WMessages getWMessageInstance() {
		MessageContainer container = getMessageContainer(component);
		WMessages result = null;

		if (container == null) {
			LOG.warn("No MessageContainer as ancestor of " + component
					+ ". Messages will not be added");
		} else {
			result = container.getMessages();

			if (result == null) {
				LOG.warn("No messages in container of " + component
						+ ". Messages will not be added");
			}
		}

		return result;
	}
521772
public SIMPMessage getMessageLocked() throws MessageStoreException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getMessageLocked");
    
    SIMPMessage msg = null;
    
    if(classifyingMessages)
    {
      // Take the classifications read lock
      consumerSet.takeClassificationReadLock();

      // Classifications may change dynamically, so check the pendingReset
      // flag under this lock. If classifications have changed then we'll
      // set up the filters again
      if(pendingFlowReset)
      {
        pendingFlowReset = false;
        resetFlowProperties();
      }
        
      // Determine which cursor to use. chooseGetCursorIndex() will 
      // randomly choose an index if XD has specified weightings.
      // The method can be called more than once. This supports the situation
      // where we've looked for but not found any messages of a particular 
      // classification. 
      // 
      // If chooseGetCursorIndex() returns 0, then either no classifications were 
      // specified or we've already tried all the classifications. An index
      // of 0 leads to the use of the default (unclassified) cursor.
      int classIndex = -1;
      while(classIndex != 0)
      {
        classIndex = chooseGetCursorIndex(classIndex);
     
        // Always use the cursor straight from the key
        msg = getMessageLocked(classIndex);

        if(msg != null)
          classIndex = 0;
      }

      // Free the classifications read lock
      consumerSet.freeClassificationReadLock();
    }
    else // Not classifying
    {
      // Use the zeroth index
      msg = getMessageLocked(0);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getMessageLocked", msg);

    return msg;
  }
688256
private <T> T getProxyObject(
      T originalObject, AdWordsSession session, Class<T> cls, boolean isUtility) {
    // Find the retry strategy of this class type.
    ApiRetryStrategy retryStrategy =
        ApiRetryStrategyManager.getRetryStrategy(cls.getSimpleName(), isUtility);

    // If no corresponding retry strategy, just use the original object instead of a wrapping proxy.
    if (retryStrategy == null) {
      return originalObject;
    }

    InvocationHandler invocationHandler =
        new ApiInvocationHandlerWithRateLimiter(originalObject, session, retryStrategy);
    return Reflection.newProxy(cls, invocationHandler);
  }