|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.contrib.hessian.AMQPHessianProxyFactory
public class AMQPHessianProxyFactory
Factory for creating Hessian client stubs. The returned stub will call the remote object for all methods.
HelloHome hello = (HelloHome) factory.create(HelloHome.class, null);After creation, the stub can be like a regular Java class. Because it makes remote calls, it can throw more exceptions than a Java class. In particular, it may throw protocol exceptions. This class is derived from
HessianProxyFactory
.
Constructor Summary | |
---|---|
AMQPHessianProxyFactory()
Creates the new proxy factory. |
Method Summary | ||
---|---|---|
|
create(Class<T> api,
String urlName)
Creates a new proxy with the specified URL. |
|
|
create(Class<T> api,
String urlName,
ClassLoader loader)
Creates a new proxy with the specified URL. |
|
long |
getConnectTimeout()
Returns the socket timeout on connect in milliseconds. |
|
String |
getQueuePrefix()
Returns the prefix of the queue that receives the hessian requests. |
|
long |
getReadTimeout()
Returns the socket timeout on requests in milliseconds. |
|
HessianRemoteResolver |
getRemoteResolver()
Returns the remote resolver. |
|
SerializerFactory |
getSerializerFactory()
Gets the serializer factory. |
|
boolean |
isCompressed()
Indicates if the requests/responses should be compressed. |
|
boolean |
isDebug()
Gets the debug mode. |
|
boolean |
isOverloadEnabled()
Returns true if overloaded methods are allowed (using mangling) |
|
protected org.apache.qpid.transport.Connection |
openConnection()
Creates the URL connection. |
|
void |
setCompressed(boolean compressed)
Specifies if the requests/responses should be compressed. |
|
void |
setConnectTimeout(long _connecTimeout)
Sets the socket timeout on connect in milliseconds. |
|
void |
setDebug(boolean isDebug)
Sets the debug mode. |
|
void |
setHessian2Reply(boolean isHessian2)
True if the proxy can read Hessian 2 responses. |
|
void |
setHessian2Request(boolean isHessian2)
True if the proxy should send Hessian 2 requests. |
|
void |
setOverloadEnabled(boolean isOverloadEnabled)
set true if overloaded methods are allowed (using mangling) |
|
void |
setPassword(String password)
Sets the password of the user connecting to the AMQP server. |
|
void |
setQueuePrefix(String queuePrefix)
Sets the prefix of the queue that receives the hessian requests. |
|
void |
setReadTimeout(long timeout)
Sets the socket timeout on requests in milliseconds. |
|
void |
setSerializerFactory(SerializerFactory factory)
Sets the serializer factory. |
|
void |
setUser(String user)
Sets the user connecting to the AMQP server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AMQPHessianProxyFactory()
Method Detail |
---|
public void setUser(String user)
public void setPassword(String password)
public String getQueuePrefix()
public void setQueuePrefix(String queuePrefix)
public void setDebug(boolean isDebug)
public boolean isDebug()
public boolean isOverloadEnabled()
public void setOverloadEnabled(boolean isOverloadEnabled)
public long getReadTimeout()
public void setReadTimeout(long timeout)
public long getConnectTimeout()
public void setConnectTimeout(long _connecTimeout)
public boolean isCompressed()
public void setCompressed(boolean compressed)
public void setHessian2Reply(boolean isHessian2)
public void setHessian2Request(boolean isHessian2)
public HessianRemoteResolver getRemoteResolver()
public void setSerializerFactory(SerializerFactory factory)
public SerializerFactory getSerializerFactory()
protected org.apache.qpid.transport.Connection openConnection() throws IOException
IOException
public <T> T create(Class<T> api, String urlName) throws MalformedURLException
String url = "amqp://user:password@localhost:5672/vhost/queue"); HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);
api
- the interface the proxy class needs to implementurlName
- the URL where the client object is located.
MalformedURLException
public <T> T create(Class<T> api, String urlName, ClassLoader loader) throws MalformedURLException
String url = "amqp://user:password@localhost:5672/vhost/queue"); HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);
api
- the interface the proxy class needs to implementurlName
- the URL where the client object is located.
MalformedURLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |