Get the event stream associated with this WVA

        Note that this event stream is shared across all users of this WVA device
        as the WVA only supports a single event stream.

        :return: a new :class:`WVAEventStream` instance
430388
def get_event_stream(self):
        
        if self._event_stream is None:
            self._event_stream = WVAEventStream(self._http_client)
        return self._event_stream
735646
def get_log_stream(logger):
    

    file_stream = None
    log_stream = None
    for handler in logger.handlers:
        if isinstance(handler, logging.FileHandler):
            file_stream = handler.stream
        else:
            log_stream = handler.stream

    if file_stream:
        return file_stream

    return log_stream
1243123
def stream(self):
        '''
        
        '''
        if not hasattr(self, '_stream'):
            self._stream = zmq.eventloop.zmqstream.ZMQStream(self._socket, io_loop=self.io_loop)
        return self._stream
473725
def _get_event_source_obj(awsclient, evt_source):
    
    event_source_map = {
        'dynamodb': event_source.dynamodb_stream.DynamoDBStreamEventSource,
        'kinesis': event_source.kinesis.KinesisEventSource,
        's3': event_source.s3.S3EventSource,
        'sns': event_source.sns.SNSEventSource,
        'events': event_source.cloudwatch.CloudWatchEventSource,
        'cloudfront': event_source.cloudfront.CloudFrontEventSource,
        'cloudwatch_logs': event_source.cloudwatch_logs.CloudWatchLogsEventSource,
    }

    evt_type = _get_event_type(evt_source)
    event_source_func = event_source_map.get(evt_type, None)
    if not event_source:
        raise ValueError('Unknown event source: {0}'.format(
            evt_source['arn']))

    return event_source_func(awsclient, evt_source)
608782
function getStream()
    {
        if ($err = $this->getError() !== UPLOAD_ERR_OK)
            // TODO Handle Upload With Exception Error
            throw new \RuntimeException(sprintf(
                'Cannot retrieve stream due to upload error. error: (%s).'
                , getUploadErrorMessageFromCode($err)
            ));

        if ($this->isFileMoved)
            throw new \RuntimeException('Cannot retrieve stream after it has already been moved');

        if ($this->stream)
            return $this->stream;

        $givenFileResource = $this->_c_givenResource;
        if (!$givenFileResource instanceof StreamInterface)
            $givenFileResource = new Stream($givenFileResource, 'r');
        
        return $this->stream = $givenFileResource;
    }
306056
def get_events(self):
        
        res = copy.copy(self.events)
        del self.events[:]
        return res
415253
def PopEventSource(self):
    
    try:
      _, _, event_source = heapq.heappop(self._heap)

    except IndexError:
      return None

    return event_source
671963
def stream(self, name):
        
        if self.stream_name != "default":
            raise ValueError("Nested streams aren't supported")
        if self._streams.get(name) == None:
            self._streams[name] = History(self.fname, out_dir=self.out_dir,
                                          add_callback=self._add_callback, stream_name=name)
        return self._streams[name]
640297
def stop_event_stream(self):
        
        if self._stream:
            self._stream.stop()
            self._stream.join()
            self._stream = None
            with self._events.mutex:
                self._events.queue.clear()
716931
def _retrieve(self, namespace, stream, start_id, end_time, order, limit,
                configuration):
    
    start_id_event = Event(start_id)
    end_id_event = Event(uuid_from_kronos_time(end_time,
                                               _type=UUIDType.HIGHEST))
    stream_events = self.db[namespace][stream]

    # Find the interval our events belong to.
    lo = bisect.bisect_left(stream_events, start_id_event)
    if lo + 1 > len(stream_events):
      return
    if stream_events[lo] == start_id_event:
      lo += 1
    hi = bisect.bisect_right(stream_events, end_id_event)

    if order == ResultOrder.DESCENDING:
      index_it = xrange(hi - 1, lo - 1, -1)
    else:
      index_it = xrange(lo, hi)

    for i in index_it:
      if limit <= 0:
        break
      limit -= 1
      yield marshal.dumps(stream_events[i])
696715
def GetStream(data=None):
        
        if len(__mstreams_available__) == 0:
            if data:
                mstream = MemoryStream(data)
                mstream.seek(0)
            else:
                mstream = MemoryStream()
            __mstreams__.append(mstream)
            return mstream

        mstream = __mstreams_available__.pop()

        if data is not None and len(data):
            mstream.Cleanup()
            mstream.write(data)

        mstream.seek(0)

        return mstream
294990
def get_token_stream(source: str) -> CommonTokenStream:
    
    lexer = LuaLexer(InputStream(source))
    stream = CommonTokenStream(lexer)
    return stream
653155
def realtime_stream(self, channel=1, typeno=0, path_file=None):
        
        ret = self.command(
            'realmonitor.cgi?action=getStream&channel={0}&subtype={1}'.format(
                channel, typeno)
        )

        if path_file:
            with open(path_file, 'wb') as out_file:
                shutil.copyfileobj(ret.raw, out_file)

        return ret.raw
979395
def events(self, **kwargs):
        
        events_result = self.service.events().list(**kwargs).execute()
        return [Event(event) for event in events_result.get("items", [])]
14628
def GetDataStreamByPathSpec(self, path_spec):
    
    file_entry = self.GetFileEntryByPathSpec(path_spec)
    if not file_entry:
      return None

    data_stream_name = getattr(path_spec, 'data_stream', None)
    return file_entry.GetDataStream(data_stream_name)
172549
def get_event(self):
        

        if not self.is_event_message:
            return None

        # select a dummy field (eg. subject) to avoid pull unneccesary data
        query = self.q().select('subject').expand('event')

        url = self.build_url(self._endpoints.get('get_message').format(id=self.object_id))

        response = self.con.get(url, params=query.as_params())

        if not response:
            return None

        data = response.json()
        event_data = data.get(self._cc('event'))

        return Event(parent=self, **{self._cloud_data_key: event_data})
1183664
def get_events(self, *args, **kwargs):
        
        from .event import Event, EventDataWrapper
        return self.get_related_resource(Event, EventDataWrapper, args, kwargs)