# # 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",
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)
# # 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", ]