コード例 #1
0
ファイル: queueproxy.py プロジェクト: brodie20j/PyClient
 def __init__(self,title,connfamily):
     self.title=title
     self.connection=connfamily
     firstpack=proxycodec.createProxy(self.title,"hz:impl:queueService")
     self.connection.sendPackage(firstpack.encodeMessage())
     response=self.connection.waitAndGetPackage()
     if response is not None:
         print "Initialized and connected proxy!"
     else:
         print "Unable to connect to server."
コード例 #2
0
 def __init__(self,title,connfamily):
     self.title=title
     self.connection=connfamily
     firstpack=proxycodec.createProxy(self.title, "hz:impl:mapService")
     self.connection.sendPackage(firstpack)
     response=self.connection.getPackageWithCorrelationId(firstpack.correlation,True)
     newresponse=ClientMessage.decodeMessage(response)
     if response is not None:
         print "Initialized and connected proxy!"
     else:
         print "Unable to connect to server."
コード例 #3
0
 def __init__(self,title,connfamily):
     self.title=title
     self.connection=connfamily
     firstpack=proxycodec.createProxy(self.title, "hz:impl:setService")
     self.connection.adjustCorrelationId(firstpack)
     self.connection.sendPackage(firstpack)
     response=self.connection.getPackageWithCorrelationId(firstpack.correlation,True)
     if response is not None:
         "Set proxy initialized"
     else:
         "Couldn't initalize"
コード例 #4
0
    def __init__(self,title,conn):
        self.title=title
        self.connection=conn
        firstpack=proxycodec.createProxy(self.title,"hz:impl:atomicLongService")
        self.connection.adjustCorrelationId(firstpack)
        self.connection.sendPackage(firstpack.encodeMessage())

        response=self.connection.getPackageWithCorrelationId(firstpack.correlation,True)
        if response is not None:
            print "Initialized and connected proxy!"
        else:
            print "Unable to connect to server."
コード例 #5
0
    def __init__(self,title,connfamily):
        self.title=title
        self.connection=connfamily
        firstpack=proxycodec.createProxy(self.title, "hz:impl:listService")
        self.connection.adjustCorrelationId(firstpack)
        self.connection.sendPackage(firstpack)

        response=self.connection.getPackageWithCorrelationId(firstpack.correlation,firstpack.retryable)

        if response is not None:
            print "Proxy initialized"
        else:
            print "well uh oh"
コード例 #6
0
 def __init__(self,title,connfamily):
     self.title=title
     self.connection=connfamily
     firstpack=proxycodec.createProxy(self.title, "hz:impl:cacheService")
     self.connection.sendPackage(firstpack)
     response=self.connection.getPackageWithCorrelationId(firstpack.correlation)
コード例 #7
0
 def __init__(self,title,connfamily):
     self.title=title
     self.connection=connfamily
     firstpack=proxycodec.createProxy(encode.encodestring(self.title), "hz:impl:queueService")
     self.connection.sendPackage(firstpack.encodeMessage())
     response=self.connection.getPackageWithCorrelationId(firstpack.correlation)