コード例 #1
0
ファイル: feed.py プロジェクト: offlinehacker/flumotion
    def _doFeedTo(self, fullFeedId, t):
        self.debug('flushing PB write queue')
        t.doWrite()
        self.debug('stop writing to transport')
        t.stopWriting()

        # make sure shutdown() is not called on the socket
        t.keepSocketAlive = True

        fd = os.dup(t.fileno())
        # Similar to feedserver._sendFeedReplyCb, but since we are in a
        # callLater, not doReadOrWrite, we call connectionLost directly
        # on the transport.
        t.connectionLost(failure.Failure(main.CONNECTION_DONE))

        # This medium object is of no use any more; drop our reference
        # to the remote so we can avoid cycles.
        self.setRemoteReference(None)

        (flowName, componentName, feedName) = common.parseFullFeedId(
            fullFeedId)
        feedId = common.feedId(componentName, feedName)

        self.debug('firing deferred with feedId %s on fd %d', feedId,
                   fd)
        self._feedToDeferred.callback((feedId, fd))
コード例 #2
0
    def _doFeedTo(self, fullFeedId, t):
        self.debug('flushing PB write queue')
        t.doWrite()
        self.debug('stop writing to transport')
        t.stopWriting()

        # make sure shutdown() is not called on the socket
        t.keepSocketAlive = True

        fd = os.dup(t.fileno())
        # Similar to feedserver._sendFeedReplyCb, but since we are in a
        # callLater, not doReadOrWrite, we call connectionLost directly
        # on the transport.
        t.connectionLost(failure.Failure(main.CONNECTION_DONE))

        # This medium object is of no use any more; drop our reference
        # to the remote so we can avoid cycles.
        self.setRemoteReference(None)

        (flowName, componentName,
         feedName) = common.parseFullFeedId(fullFeedId)
        feedId = common.feedId(componentName, feedName)

        self.debug('firing deferred with feedId %s on fd %d', feedId, fd)
        self._feedToDeferred.callback((feedId, fd))
コード例 #3
0
ファイル: component.py プロジェクト: offlinehacker/flumotion
    def getFeedId(self, feedName):
        """
        Get the feedId of a feed provided or consumed by this component.

        @param feedName: The name of the feed (i.e., eater alias or
                         feeder name)
        @rtype: L{flumotion.common.common.feedId}
        """
        return common.feedId(self.getName(), feedName)
コード例 #4
0
    def getFeedId(self, feedName):
        """
        Get the feedId of a feed provided or consumed by this component.

        @param feedName: The name of the feed (i.e., eater alias or
                         feeder name)
        @rtype: L{flumotion.common.common.feedId}
        """
        return common.feedId(self.getName(), feedName)
コード例 #5
0
ファイル: feedersnode.py プロジェクト: faroncoder/flumotion
 def _mungeClientId(self, clientId):
     try:
         flowName, compName, feedName = common.parseFullFeedId(clientId)
         return common.feedId(compName, feedName)
     except:
         return clientId
コード例 #6
0
 def _mungeClientId(self, clientId):
     try:
         flowName, compName, feedName = common.parseFullFeedId(clientId)
         return common.feedId(compName, feedName)
     except:
         return clientId
コード例 #7
0
 def getFeedId(self, feedName):
     return common.feedId(self._name, feedName)
コード例 #8
0
 def getFeedId(self, feedName):
     return common.feedId(self._name, feedName)