示例#1
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))
示例#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
    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
 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
 def getFeedId(self, feedName):
     return common.feedId(self._name, feedName)
示例#8
0
 def getFeedId(self, feedName):
     return common.feedId(self._name, feedName)