Package proton
[frames] | no frames]

Source Code for Package proton

  1  # 
  2  # Licensed to the Apache Software Foundation (ASF) under one 
  3  # or more contributor license agreements.  See the NOTICE file 
  4  # distributed with this work for additional information 
  5  # regarding copyright ownership.  The ASF licenses this file 
  6  # to you under the Apache License, Version 2.0 (the 
  7  # "License"); you may not use this file except in compliance 
  8  # with the License.  You may obtain a copy of the License at 
  9  # 
 10  #   http://www.apache.org/licenses/LICENSE-2.0 
 11  # 
 12  # Unless required by applicable law or agreed to in writing, 
 13  # software distributed under the License is distributed on an 
 14  # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
 15  # KIND, either express or implied.  See the License for the 
 16  # specific language governing permissions and limitations 
 17  # under the License. 
 18  # 
 19   
 20  """ 
 21  The proton module defines a suite of APIs that implement the AMQP 1.0 
 22  protocol. 
 23   
 24  The proton APIs consist of the following classes: 
 25   
 26   - L{Message}   -- A class for creating and/or accessing AMQP message content. 
 27   - L{Data}      -- A class for creating and/or accessing arbitrary AMQP encoded 
 28                    data. 
 29   
 30  """ 
 31  from __future__ import absolute_import 
 32   
 33  import logging 
 34   
 35  from cproton import PN_VERSION_MAJOR, PN_VERSION_MINOR, PN_VERSION_POINT 
 36   
 37  from ._condition import Condition 
 38  from ._data import UNDESCRIBED, Array, Data, Described, char, symbol, timestamp, ubyte, ushort, uint, ulong, \ 
 39      byte, short, int32, float32, decimal32, decimal64, decimal128 
 40  from ._delivery import Delivery, Disposition 
 41  from ._endpoints import Endpoint, Connection, Session, Link, Receiver, Sender, Terminus 
 42  from ._events import Collector, Event, EventType, Handler 
 43  from ._exceptions import ProtonException, MessageException, DataException, TransportException, \ 
 44      SSLException, SSLUnavailable, ConnectionException, SessionException, LinkException, Timeout, Interrupt 
 45  from ._message import Message 
 46  from ._transport import Transport, SASL, SSL, SSLDomain, SSLSessionDetails 
 47  from ._url import Url 
 48   
 49  __all__ = [ 
 50      "API_LANGUAGE", 
 51      "IMPLEMENTATION_LANGUAGE", 
 52      "UNDESCRIBED", 
 53      "Array", 
 54      "Collector", 
 55      "Condition", 
 56      "Connection", 
 57      "ConnectionException", 
 58      "Data", 
 59      "DataException", 
 60      "Delivery", 
 61      "Disposition", 
 62      "Described", 
 63      "Endpoint", 
 64      "Event", 
 65      "EventType", 
 66      "Handler", 
 67      "Link", 
 68      "LinkException", 
 69      "Message", 
 70      "MessageException", 
 71      "ProtonException", 
 72      "VERSION_MAJOR", 
 73      "VERSION_MINOR", 
 74      "Receiver", 
 75      "SASL", 
 76      "Sender", 
 77      "Session", 
 78      "SessionException", 
 79      "SSL", 
 80      "SSLDomain", 
 81      "SSLSessionDetails", 
 82      "SSLUnavailable", 
 83      "SSLException", 
 84      "Terminus", 
 85      "Timeout", 
 86      "Interrupt", 
 87      "Transport", 
 88      "TransportException", 
 89      "Url", 
 90      "char", 
 91      "symbol", 
 92      "timestamp", 
 93      "ulong", 
 94      "byte", 
 95      "short", 
 96      "int32", 
 97      "ubyte", 
 98      "ushort", 
 99      "uint", 
100      "float32", 
101      "decimal32", 
102      "decimal64", 
103      "decimal128" 
104  ] 
105   
106  VERSION_MAJOR = PN_VERSION_MAJOR 
107  VERSION_MINOR = PN_VERSION_MINOR 
108  VERSION_POINT = PN_VERSION_POINT 
109  VERSION = (VERSION_MAJOR, VERSION_MINOR, VERSION_POINT) 
110  API_LANGUAGE = "C" 
111  IMPLEMENTATION_LANGUAGE = "C" 
112   
113   
114  # This private NullHandler is required for Python 2.6, 
115  # when we no longer support 2.6 replace this NullHandler class definition and assignment with: 
116  #  handler = logging.NullHandler() 
117 -class NullHandler(logging.Handler):
118 - def handle(self, record):
119 pass
120
121 - def emit(self, record):
122 pass
123
124 - def createLock(self):
125 self.lock = None
126 127 128 handler = NullHandler() 129 130 log = logging.getLogger("proton") 131 log.addHandler(handler) 132