print "GatewayConnectorDelegate.onPushAcknowledgemetnReceived"
      receivedTime = time.time()
      print receivedTime
      print ack.uid
      print ack.acknowledgingDevice 
      print ack.acknowledgingUser 


  delegate  = GatewayConnectorD( )
  connector = GatewayConnector( delegate )


  data = PushData( )
  data.uri = "java api test"
  # data.mimeType = "ammo/edu.vu.isis.ammo.dash.event"
  data.mimeType = "ammo/transapps.chat.message_groupAll"
  # data.mimeType = "ammo/com.aterrasys.nevada.locations"
  data.originUserName = "******"
  data.originDevice = "testDevice"
  data.data = "My BIG FAT JSON String"
  data.ackThresholds = AcknowledgementThresholds()
  data.ackThresholds.deviceDelivered = True
  data.ackThresholds.pluginDelivered = True


  
  try:
    time.sleep(3)
    counter = 0

    while True:
Beispiel #2
0
    def onDisconnect(self, sender):
      global isConnected
      print "GatewayConnectorDelegate.onDisonnect"
      isConnected = int(0)

    def onAuthenticationResponse(self, sender, result):
      print "GatewayConnectorDelegate.onAuthenticationResponse"

  delegate  = GatewayConnectorD( )
  connector = GatewayConnector( delegate )

  data = PushData( )
  data.uri = "java api test"
  # data.mimeType = "ammo/edu.vu.isis.ammo.dash.event"
  # data.mimeType = "ammo/transapps.chat.message_groupAll"
  data.mimeType = "ammo/com.aterrasys.nevada.locations"
  data.originUserName = "******"
  data.data = "My BIG FAT JSON String"
  
  try:
    time.sleep(3)
    counter = 0

    while True:
      if isConnected == 1:
         print "Pushing Data."
         ret = connector.pushData(data)
         print ret
         #time.sleep(0.01)
         time.sleep(1)
      else: