예제 #1
0
파일: __init__.py 프로젝트: zmanchun/jmx4py
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

import socket
import urllib2
import httplib

from jmx4py.jolokia.errors import JmxException, JmxResponseError
from jmx4py.jolokia.client import JmxClient, quote, unquote
from jmx4py.jolokia.connection import JmxConnection, JmxHttpConnection

JmxConnection.register("http", JmxHttpConnection)
JmxConnection.register("https", JmxHttpConnection)

ERRORS = (
    socket.error,
    urllib2.URLError,
    httplib.HTTPException,
    JmxException,
)

__all__ = [
    "ERRORS",
    "JmxException",
    "JmxResponseError",
    "quote",
    "unquote",
예제 #2
0
파일: client.py 프로젝트: sgalaburda/jmx4py
 def __init__(self, url, **kw):
     """ Open a proxy connection to a Jolokia agent.
     """
     self.cfg = JmxClientConfig(url, **kw)
     self.connection = JmxConnection.from_url(self.cfg.url)
예제 #3
0
파일: client.py 프로젝트: sgalaburda/jmx4py
 def __init__(self, url, **kw):
     """ Open a proxy connection to a Jolokia agent.
     """
     self.cfg = JmxClientConfig(url, **kw)
     self.connection = JmxConnection.from_url(self.cfg.url)
예제 #4
0
파일: __init__.py 프로젝트: jhermann/jmx4py
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

import socket
import urllib2
import httplib

from jmx4py.jolokia.errors import JmxException, JmxResponseError
from jmx4py.jolokia.client import JmxClient, quote, unquote
from jmx4py.jolokia.connection import JmxConnection, JmxHttpConnection

JmxConnection.register("http", JmxHttpConnection)
JmxConnection.register("https", JmxHttpConnection)

ERRORS = (
    socket.error,
    urllib2.URLError,
    httplib.HTTPException,
    JmxException,
)

__all__ = [
    "ERRORS", "JmxException", "JmxResponseError",
    "quote", "unquote",
    "JmxClient", "JmxConnection", "JmxHttpConnection",
]