net.sourceforge.xmote.http
Class XmoteHttpClient

java.lang.Object
  extended by net.sourceforge.xmote.http.XmoteHttpClient
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class XmoteHttpClient
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

An Xmote client that performs method calls over HTTP.

The java.lang.Proxy class is used to create a dynamic instance of the supplied interfaces at runtime. This allows the client to act as an instance of the Xmote service.

Author:
Jason Rush

Field Summary
protected  org.apache.commons.httpclient.HttpClient httpClient
           
protected  java.lang.String url
           
 
Constructor Summary
protected XmoteHttpClient(java.lang.String url)
           
 
Method Summary
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
static java.lang.Object newInstance(java.lang.String url, java.lang.Class<?>[] interfaces)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

protected java.lang.String url

httpClient

protected org.apache.commons.httpclient.HttpClient httpClient
Constructor Detail

XmoteHttpClient

protected XmoteHttpClient(java.lang.String url)
Method Detail

newInstance

public static java.lang.Object newInstance(java.lang.String url,
                                           java.lang.Class<?>[] interfaces)

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable
See Also:
InvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])


Copyright (C) 2007 Jason Rush. All Rights Reserved.