Creates a RemoteServiceAdminEvent object from the update of an
        ExportRegistration
324138
def fromexportupdate(cls, bundle, export_reg):
        # type: (Bundle, ExportRegistration) -> RemoteServiceAdminEvent
        
        exc = export_reg.get_exception()
        if exc:
            return RemoteServiceAdminEvent(
                RemoteServiceAdminEvent.EXPORT_ERROR,
                bundle,
                export_reg.get_export_container_id(),
                export_reg.get_remoteservice_id(),
                None,
                export_reg.get_export_reference(),
                None,
                export_reg.get_description(),
            )

        return RemoteServiceAdminEvent(
            RemoteServiceAdminEvent.EXPORT_UPDATE,
            bundle,
            export_reg.get_export_container_id(),
            export_reg.get_remoteservice_id(),
            None,
            export_reg.get_export_reference(),
            None,
            export_reg.get_description(),
        )
1338298
protected SubscriptionMessage generateResetSubscriptionMessage()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "generateResetSubscriptionMessage");
    
    // Get the Message Handler for doing this operation.
    final SubscriptionMessageHandler messageHandler =
      iProxyHandler.getMessageHandler();

    // Reset the message.
    messageHandler.resetResetSubscriptionMessage();
     
    // Add the local subscriptions
    addToMessage(messageHandler, iLocalSubscriptions);
      
    // Add the remote Subscriptions
    addToMessage(messageHandler, iRemoteSubscriptions);
      
    SubscriptionMessage message = messageHandler.getSubscriptionMessage();
 
    // Add the message back into the pool
    iProxyHandler.addMessageHandler(messageHandler);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "generateResetSubscriptionMessage", message);
   
    return message;
  }
1002268
@Override
  public byte[] encode(final RemoteEvent<T> obj) {
    if (obj.getEvent() == null) {
      throw new RemoteRuntimeException("Event is null");
    }

    final WakeMessagePBuf.Builder builder = WakeMessagePBuf.newBuilder();
    builder.setSeq(obj.getSeq());
    builder.setData(ByteString.copyFrom(encoder.encode(obj.getEvent())));

    return builder.build().toByteArray();
  }
1268328
def from_export(cls, endpoint):
        # type: (ExportEndpoint) -> EndpointDescription
        
        assert isinstance(endpoint, ExportEndpoint)

        # Service properties
        properties = endpoint.get_properties()

        # Set import keys
        properties[pelix.remote.PROP_ENDPOINT_ID] = endpoint.uid
        properties[pelix.remote.PROP_IMPORTED_CONFIGS] = endpoint.configurations
        properties[
            pelix.remote.PROP_EXPORTED_INTERFACES
        ] = endpoint.specifications

        # Remove export keys
        for key in (
            pelix.remote.PROP_EXPORTED_CONFIGS,
            pelix.remote.PROP_EXPORTED_INTERFACES,
            pelix.remote.PROP_EXPORTED_INTENTS,
            pelix.remote.PROP_EXPORTED_INTENTS_EXTRA,
        ):
            try:
                del properties[key]
            except KeyError:
                pass

        # Other information
        properties[pelix.remote.PROP_ENDPOINT_NAME] = endpoint.name
        properties[
            pelix.remote.PROP_ENDPOINT_FRAMEWORK_UUID
        ] = endpoint.framework

        return EndpointDescription(None, properties)
1226221
public void updateFailoverEntry(byte[] beanData, long lastAccessTime) throws RemoteException //LIDB2018
    {
        try {
            // Note, updating failover entry for a SFSB only occurs when
            // the bean is passivated.  Therefore, the updateEntry
            // method implicitly sets the passivated flag in reaper.
            ivSfFailoverClient.passivated(beanId, beanData, lastAccessTime); //d204278.2
        } catch (Exception e) {
            FFDCFilter.processException(e, CLASS_NAME + ".updateFailoverEntry", "1137", this);
            throw new RemoteException("Could not update SFSB Entry", e);
        }
    }
438433
function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
    if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
        scheduler = selectorOrScheduler;
    }
    var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
    var subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
    return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return subject; }, selector)(source); };
}
763619
function log_event(req, code, message, elapsed) {
  return {
    code:           code,
    message:        message,
    elapsed:        elapsed,
    request:        req,
    url:            req.originalUrl || req.url,
    method:         req.method,
    headers:        req.headers,
    httpVersion:    req.httpVersion,
    remoteAddress:  req.connection.remoteAddress
  };
}
550912
public InputStream export(Context context,
                              String pid,
                              String format,
                              String exportContext,
                              String encoding) throws ServerException {
        return delegate.export(context, pid, format, exportContext, encoding);
    }
297404
private void publishLocalEvent(String cacheId, Object eventData, Extractors extractors) {
        Collection<EventRegistration> eventRegistrations = getRegistrations(cacheId);
        if (eventRegistrations.isEmpty()) {
            return;
        }

        for (EventRegistration eventRegistration : eventRegistrations) {
            Registration registration = (Registration) eventRegistration;
            Object listener = registration.getListener();
            if (!(listener instanceof QueryCacheListenerAdapter)) {
                continue;
            }
            Object eventDataToPublish = eventData;
            int orderKey = -1;
            if (eventDataToPublish instanceof LocalCacheWideEventData) {
                orderKey = cacheId.hashCode();
            } else if (eventDataToPublish instanceof LocalEntryEventData) {
                LocalEntryEventData localEntryEventData = (LocalEntryEventData) eventDataToPublish;
                if (localEntryEventData.getEventType() != EventLostEvent.EVENT_TYPE) {
                    EventFilter filter = registration.getFilter();
                    if (!canPassFilter(localEntryEventData, filter, extractors)) {
                        continue;
                    } else {
                        boolean includeValue = isIncludeValue(filter);
                        eventDataToPublish = includeValue
                                ? localEntryEventData : localEntryEventData.cloneWithoutValue();
                        Data keyData = localEntryEventData.getKeyData();
                        orderKey = keyData == null ? -1 : keyData.hashCode();
                    }
                }
            }

            publishEventInternal(registration, eventDataToPublish, orderKey);
        }
    }
728133
function(serviceName, method) {
      
      if(this[method]){
			throw new Error("WARNING: "+ serviceName+ " already exists for service. Unable to generate function");
		}
		method.name = serviceName;
	
		var self = this;
		var func = function(data, opts) {
		   var envelope = rpc.Envelope[method.envelope || self._smd.envelope];
		   var callback = {
   	      success: function(o) {
               var results = envelope.deserialize(o);
      	      opts.success.call(opts.scope || self, results);
   	      },
   	      failure: function(o) {
   	         if(lang.isFunction(opts.failure) ) {
						var results = envelope.deserialize(o);
   	            opts.failure.call(opts.scope || self, results);
   	         }
   	      },
   	      scope: self
   	   };
   	   
   	   
   	   var params = {};
   	   if(self._smd.additionalParameters && lang.isArray(self._smd.parameters) ) {
   	      for(var i = 0 ; i < self._smd.parameters.length ; i++) {
   	         var p = self._smd.parameters[i];
   	         params[p.name] = p["default"];
   	      }
   	   }
   	   lang.augmentObject(params, data, true);
   	   
   	   var url = method.target || self._smd.target;
   	   var urlRegexp = /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/i;
   	   if(!url.match(urlRegexp) && url != self._smd.target) {
   	      url = self._smd.target+url;
   	   }
   	   
	      if( !!this.smdUrl && !url.match(urlRegexp) ) {
   	      // URL is still relative !
   	      var a=this.smdUrl.split('/');
   	      a[a.length-1]="";
   	      url = a.join("/")+url;
   	   }
   	   
   	   
         var r = {
            target: url,
            callback: callback,
            data: params,
            origData: data,
            opts: opts,
            callbackParamName: method.callbackParamName || self._smd.callbackParamName,
            transport: method.transport || self._smd.transport
         };
   	   var serialized = envelope.serialize(self._smd, method, params);
         lang.augmentObject(r, serialized, true);
         
   	   rpc.Transport[r.transport].call(self, r ); 
		};
		
		func.name = serviceName;
		func.description = method.description;
		func._parameters = method.parameters;
		
		return func;
   }
358038
function emitEvent(payload, eventNameBase, debugParams) {

        // create a copy of the payload so that nothing modifies the original object
        try {
            payload = JSON.parse(JSON.stringify(payload));
        }
        catch (err) {
            /* eslint no-console:0 */
            console.log('issue parsing during emit ' + JSON.stringify(eventNameBase));
        }

        // we don't want to emit the potentially huge resource file
        if (payload && payload.resource) {
            delete payload.resource;
        }

        // create the event data and emit the event
        var name = _.extend({}, eventNameBase, debugParams);
        var eventData = {
            name: name,
            payload: payload
        };
        var eventName = name.resource + '.' + name.adapter + '.' + name.method;
        eventName += debugParams ? '.' + name.type + '.' + name.timing : '';
        eventBus.emit(eventName, eventData);
    }
565795
public static RmiServiceInvocation create(Object remoteTarget, Method method, Object[] args) {
        RmiServiceInvocation serviceInvocation = new RmiServiceInvocation();

        if (Proxy.isProxyClass(remoteTarget.getClass())) {
            serviceInvocation.setRemote(method.getDeclaringClass().getName());
        } else {
            serviceInvocation.setRemote(remoteTarget.getClass().getName());
        }

        serviceInvocation.setMethod(method.getName());

        if (args != null) {
            serviceInvocation.setArgs(new RmiServiceInvocation.Args());

            for (Object arg : args) {
                MethodArg methodArg = new MethodArg();

                methodArg.setValueObject(arg);
                if (Map.class.isAssignableFrom(arg.getClass())) {
                    methodArg.setType(Map.class.getName());
                } else if (List.class.isAssignableFrom(arg.getClass())) {
                    methodArg.setType(List.class.getName());
                } else {
                    methodArg.setType(arg.getClass().getName());
                }

                serviceInvocation.getArgs().getArgs().add(methodArg);
            }
        }

        return serviceInvocation;
    }
565351
function RemoteObject(name, response) {
  // I don't think this is strictly necessary.
  Stream.call(this);

  // A readable stream.
  this.readable = true;
  this._paused = false;
  this._data = response;

  var emitter = this;
  // The event handlers for stream.
  function ondata(chunk) {
    emitter.emit('data', chunk);
  }
  function onerror(e) {
    emitter.emit('error', e);
  }
  function onend() {
    emitter.emit('end');
  }
  function onclose(e) {
    emitter.emit('close', e);
  }

  // Pipe these events through.
  this._data.on('data', ondata);
  this._data.on('error', onerror);
  this._data.on('end', onend);
  this._data.on('close', onclose);

  this._objectinfo = ObjectInfo.newFromResponse(name, response);
}
460055
def create_event(self, last_state, state, clean_server_name, replset_name):
        """"""

        status = self.get_state_description(state)
        short_status = self.get_state_name(state)
        last_short_status = self.get_state_name(last_state)
        hostname = self.hostname_for_event(clean_server_name)
        msg_title = "%s is %s for %s" % (hostname, short_status, replset_name)
        msg = "MongoDB %s (%s) just reported as %s (%s) for %s; it was %s before."
        msg = msg % (hostname, clean_server_name, status, short_status, replset_name, last_short_status)

        self.event(
            {
                'timestamp': int(time.time()),
                'source_type_name': self.SOURCE_TYPE_NAME,
                'msg_title': msg_title,
                'msg_text': msg,
                'host': hostname,
                'tags': [
                    'action:mongo_replset_member_status_change',
                    'member_status:' + short_status,
                    'previous_member_status:' + last_short_status,
                    'replset:' + replset_name,
                ],
            }
        )
122446
@Override
    public boolean regiserService(NaviRpcExporter exporter) {
        Class<?> interf = exporter.getServiceInterface();
        Object bean = exporter.getServiceBean();
        List<AppIdToken> appIdTokens = getAuthIfPossible(bean);
        String interfSimpleName = interf.getSimpleName();
        try {
            exporters.put(exporter.getName(), exporter);
            if (interf.isAssignableFrom(bean.getClass())) {
                Method[] ms = ReflectionUtil.getAllInstanceMethods(bean.getClass());
                for (Method m : ms) {
                    if (methodResolver.isSupport(m)) {
                        MethodWrapper methodWrapper = new MethodWrapper(interf.getName(),
                                m.getName(), MethodUtil.getArgsTypeName(m));
                        MethodWrapper defaultMethodWrapper = new MethodWrapper(interf.getName(),
                                m.getName(), StringUtil.EMPTY);
                        String key = methodWrapper.toString();
                        MethodDescriptor<String> desc = new MethodDescriptor<String>();
                        desc.setServiceId(key).setMethod(m).setTarget(bean)
                                .setArgumentClass(m.getParameterTypes())
                                .setReturnClass(m.getReturnType()).setInterfClass(interf).setAppIdTokens(appIdTokens);
                        serviceRegistry.addServiceDescriptor(key, desc);
                        serviceRegistry.addServiceDescriptor(defaultMethodWrapper.toString(), desc);
                        if (LOG.isDebugEnabled()) {
                            LOG.debug(String.format(
                                    "Register service key=[%s], %s %s#%s(%s) successfully", key, m
                                            .getReturnType().getSimpleName(), interf.getName(), m
                                            .getName(), StringUtil.toString4Array(m
                                            .getParameterTypes())));
                        }
                    }
                }
                LOG.info("Find rpc service configured, interface is "
                        + interfSimpleName + " , implementation is "
                        + AopUtils.getTargetClass(bean).getName());
                return true;
            } else {
                LOG.error("The interface " + interfSimpleName + " is not compatible with the bean "
                        + bean.getClass().getName());
            }
        } catch (Exception e) {
            LOG.error(
                    "The interface " + interfSimpleName + " is configured wrongly."
                            + e.getMessage(), e);
        }
        return false;
    }
1094813
RemoteAsyncResult exportObject() throws RemoteException {
        ivObjectID = ivRemoteRuntime.activateAsyncResult((Servant) createTie());
        return ivRemoteRuntime.getAsyncResultReference(ivObjectID);
    }
718721
private String generateScope(SignableRequest<?> request, String dateStamp,
            String serviceName, String regionName) {
        final StringBuilder scopeBuilder = new StringBuilder();
        return scopeBuilder.append(dateStamp).append("/").append(regionName)
                .append("/").append(serviceName).append("/")
                .append(SignerConstants.AWS4_TERMINATOR).toString();
    }