Returns `True` if *any* view handler in the class is currently
        available via its `is_available` method.
778060
def is_available(self):
        
        if self.is_always_available:
            return True
        for viewname in self.__views__:
            if getattr(self, viewname).is_available():
                return True
        return False
959562
def is_bound(method):
    
    @functools.wraps(method)
    def wrapper(self, *args, **kwargs):
        if not self._is_bound:
            raise ValueError("%r must be bound to call %s()" % (self, method.__name__))
        return method(self, *args, **kwargs)
    return wrapper
599535
def available_for_protocol(self, protocol):
        """"""
        if self.protocol == ALL or protocol == ALL:
            return True

        return protocol in ensure_sequence(self.protocol)
951883
def visible(self, request):
        '''
        
        '''
        return self.apply_visible(self.get_queryset(), request) if self.check_visible(self.model, request) is not False else self.get_queryset().none()
561756
def has_method(obj, name):
        
        if obj == None:
            raise Exception("Object cannot be null")
        if name == None:
            raise Exception("Method name cannot be null")

        name = name.lower()

        for method_name in dir(obj): 
            if method_name.lower() != name:
                continue

            method = getattr(obj, method_name)

            if MethodReflector._is_method(method, method_name):
                return True
        
        return False
36742
public boolean isAvailable() {
		// The channel is available is is connected
		boolean available = this.rtpChannel != null && this.rtpChannel.isConnected();
		// In case of WebRTC calls the DTLS handshake must be completed
		if(this.isWebRtc) {
			available = available && this.webRtcHandler.isHandshakeComplete();
		}
		return available;
	}
1100941
protected boolean checkHandler(RoomHandlerClass handler, 
            ApiRoom roomAgent, Object user) {
        return (handler.getRoomClass().isAssignableFrom(roomAgent.getClass())) &&
               (roomAgent.getName().startsWith(handler.getRoomName()));
    }
628279
def is_available(self):
        
        # if the availability flag is raised, return True immediately.
        # NOTE: subsequent API failures will lower this flag. we do this here
        # to ensure we don't keep hitting Cuckoo with requests while
        # availability is there.
        if self.server_available:
            return True

        # otherwise, we have to check with the cloud.
        else:
            try:
                response = self._request("cuckoo/status")

                # we've got cuckoo.
                if response.status_code == 200:
                    self.server_available = True
                    return True

            except sandboxapi.SandboxError:
                pass

        self.server_available = False
        return False
1253497
private boolean isAvailable(
                                BaseDestinationHandler destinationHandler,
                                DestinationAvailability destinationAvailability)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "isAvailable", new Object[] { destinationHandler, destinationAvailability });

        boolean sendAvailable = false;
        boolean receiveAvailable = false;

        if (destinationAvailability == DestinationAvailability.SEND
            || destinationAvailability == DestinationAvailability.SEND_AND_RECEIVE)
        {
            // Destination must be a non-mediated destination with a local queue point
            if (destinationHandler.hasLocal())
            {
                sendAvailable = true;
            }

            if (sendAvailable)
            {
                if ((destinationHandler.definition.isSendAllowed())
                    && (isLocalizationAvailable(destinationHandler, destinationAvailability)))
                {
                    sendAvailable = true;
                }
                else
                {
                    sendAvailable = false;
                }
            }
        }

        if (destinationAvailability == DestinationAvailability.RECEIVE
            || destinationAvailability == DestinationAvailability.SEND_AND_RECEIVE)
        {
            // Destination must have a queue point on the ME to which the connection is connected
            if (destinationHandler.hasLocal())
            {
                receiveAvailable = true;
            }

            if (receiveAvailable)
            {
                if ((destinationHandler.definition.isReceiveAllowed())
                    && (isLocalizationAvailable(destinationHandler, destinationAvailability)))
                {
                    receiveAvailable = true;
                }
                else
                {
                    receiveAvailable = false;
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "isAvailable", new Object[] { new Boolean(sendAvailable || receiveAvailable) });

        return (sendAvailable || receiveAvailable);
    }
774656
public boolean waitForView(View view){
		View viewToWaitFor = waitForView(view, Timeout.getLargeTimeout(), true, true);
		if(viewToWaitFor != null) {
			return true;
		}
		
		return false;
		
	}
827434
def _method(self, *args, **kwargs):
    
    yield self.resource_handler.handle(self.__resource_view_type__, *args, **kwargs)
477946
def is_registered(self, event: str, handler: T.Callable) -> bool:
        """"""

        return handler in self._events.get(event, [])
1185197
def get_view(cls, method_name):
        
        method = getattr(cls, method_name)

        @wraps(method)
        def view(request, **kwargs):
            handler = cls(request, kwargs)
            handler.call_processors('view')
            response = None
            try:
                response = method(handler)
                return response
            finally:
                handler.call_processors('post_view', response=response)

        return view
1199034
def is_stream_handler(self, request):
        
        try:
            handler = self.get(request)[0]
        except (NotFound, MethodNotSupported):
            return False
        if hasattr(handler, "view_class") and hasattr(
            handler.view_class, request.method.lower()
        ):
            handler = getattr(handler.view_class, request.method.lower())
        return hasattr(handler, "is_stream")
233899
public boolean isEnlisted()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "isEnlisted");

        boolean retval = false;

        if (_currentTran != null)
        {
            retval = true;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "isEnlisted", "return="+retval);
        return retval;
    }
1039427
def is_valid_method_view(endpoint):
    
    klass = endpoint.__dict__.get('view_class', None)
    try:
        return issubclass(klass, MethodView)
    except TypeError:
        return False
1205360
def ensureVisible(self, viewType):
        
        # make sure we're not trying to switch to the same type
        view = self.currentView()
        if type(view) == viewType:
            return view

        self.blockSignals(True)
        self.setUpdatesEnabled(False)

        for i in xrange(self.count()):
            widget = self.widget(i)
            if type(widget) == viewType:
                self.setCurrentIndex(i)
                view = widget
                break
        else:
            view = self.addView(viewType)

        self.blockSignals(False)
        self.setUpdatesEnabled(True)

        return view