403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/twisted/spread/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/spread/publish.pyc
ó
[³XMc@s†dZddlZddlmZddlmZmZmZdejfd„ƒYZ	dej
fd„ƒYZd	„Zd
„Z
dS(s]
Persistently cached objects for PB.

Maintainer: Glyph Lefkowitz

Future Plans: None known.
iÿÿÿÿN(tdefer(tbananatjellytflavorstPublishablecBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(s;An object whose cached state persists across sessions.
    cCs|jƒ||_dS(N(t	republishtpublishedID(tselfR((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pyt__init__s
cCstjƒ|_dS(sFSet the timestamp to current and (TODO) update all observers.
        N(ttimet	timestamp(R((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pyRscCs
|j|ƒS(s
(internal)(tgetStateToPublishFor(Rtperspective((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pytview_getStateToPublishscCs
|jƒS(sCImplement me to special-case your state for a perspective.
        (tgetStateToPublish(RR((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pyR#scCstd|jƒ‚dS(sKImplement me to return state to copy as part of the publish phase.
        s%s.getStateToPublishForN(tNotImplementedErrort	__class__(R((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pyR(scCsf|r!|j}|jƒj}nd}d}itj||ƒd6|jd6|d6|d6|jd6S(s?Get all necessary metadata to keep a clientside cache.
        tNonetremoteRRtserviceR
(tperspectiveNamet
getServicetserviceNameRt	ViewPointRR
(RRtobservertpnametsname((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pytgetStateToCacheAndObserveFor-s	
(	t__name__t
__module__t__doc__RRR
RRR(((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pyRs					tRemotePublishedcBsSeZdZdZdZdd„Zd„Zd„Zd„Zd„Z	d„Z
RS(	s;The local representation of remote Publishable object.
    itpubcCs#d|j|jt|jƒ|fS(Ns%s-%s-%s.%s(RRtstrR(Rtext((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pytgetFileNameBscCsÎ|jj|ƒg|_y/t|jƒdƒ}|jƒ}|jƒWntk
rad}n+Xtj	t
j|ƒƒ}|j|jk}|r®|j
|jƒd|_n|jjdƒj|j
ƒdS(NtrbiiR(t__dict__tupdatet_activationListenerstfileR#treadtclosetIOErrorRtunjellyRtdecodeR
t_cbGotUpdatet_wasCleanWhenLoadedRt
callRemotetaddCallbacks(RtstatetdataFiletdatatrecenttnewself((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pytsetCopyableStateFs	

cCs6|jjƒ}|d=|d=|d=|d=|d=|S(NtbrokerRtluidR'tisActivated(R%tcopy(Rtother((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pyt__getstate__XscCsŒ|jj|ƒd|_x|jD]}||ƒq#Wg|_|jƒt|jƒdƒ}|jtj	t
j
|ƒƒƒ|jƒdS(Nitwb(R%R&R:R't	activatedR(R#twriteRtencodeRR*(RtnewStatetlistenerR3((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pyR.cs		
cCsdS(snImplement this method if you want to be notified when your
        publishable subclass is activated.
        N((R((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pyR?pscCs*|jr||ƒn|jj|ƒdS(scExternally register for notification when this publishable has received all relevant data.
        N(R:R'tappend(Rtcallback((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pytcallWhenActivatedus	
(RRRR:R/R#R7R=R.R?RF(((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pyR=s			
	cCs,tjƒ}|jt|jd|fƒ|S(sD
    Wrap a deferred returned from a pb method in another deferred that
    expects a RemotePublished as a result.  This will allow you to wait until
    the result is really available.

    Idiomatic usage would look like::

        publish.whenReady(serverObject.getMeAPublishable()).addCallback(lookAtThePublishable)
    tcallbackArgs(RtDeferredR1t	_pubReadyterrback(tdtd2((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pyt	whenReady}s

cCs|j|jƒdS(s
(internal)N(RFRE(tresultRL((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pyRIŒs(RR	ttwisted.internetRttwisted.spreadRRRt	CacheableRtRemoteCacheRRMRI(((s:/usr/lib/python2.7/dist-packages/twisted/spread/publish.pyt<module>s*@	

Youez - 2016 - github.com/yon3zu
LinuXploit