|
JBoss EJB client 1.0.5.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.ejb.client.EJBClient
public final class EJBClient
The main EJB client API class. This class contains helper methods which may be used to create proxies, open sessions, and associate the current invocation context.
Method Summary | ||
---|---|---|
static
|
asynchronous(T proxy)
Get an asynchronous view of a proxy. |
|
static
|
createProxy(EJBLocator<T> locator)
Create a new proxy for the remote object identified by the given locator. |
|
static
|
createSession(Class<T> viewType,
String appName,
String moduleName,
String beanName,
String distinctName)
Create a new EJB session. |
|
static Future<?> |
getFutureResult()
Get the future result of an operation. |
|
static
|
getFutureResult(T operation)
Get the future result of an operation. |
|
static
|
getLocatorFor(T proxy)
Get the locator for a proxy, if it has one. |
|
static UserTransaction |
getUserTransaction(String targetNodeName)
Get a UserTransaction object instance which can be used to control transactions on a specific node. |
|
static boolean |
isEJBProxy(Object object)
Determine whether an object is indeed a valid EJB proxy object created by this API. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> T asynchronous(T proxy) throws IllegalArgumentException
void
method on the proxy will be invoked fully asynchronously
without a server round-trip delay. Any method which returns a Future
will
continue to be asynchronous. Any other method invoked on the returned proxy will return null
(the future
result can be acquired by wrapping the remote call with getFutureResult(Object)
or by using getFutureResult()
).
If an asynchronous view is passed in, the same view is returned.
T
- the proxy typeproxy
- the proxy interface instance
IllegalArgumentException
- if the given object is not a valid proxypublic static <T> Future<T> getFutureResult(T operation) throws IllegalStateException
asynchronous(Object)
.
T
- the result typeoperation
- the operation
IllegalStateException
- if the operation is not appropriately givenpublic static Future<?> getFutureResult() throws IllegalStateException
asynchronous(Object)
.
IllegalStateException
- if the operation is not appropriately givenpublic static <T> T createProxy(EJBLocator<T> locator) throws IllegalArgumentException
T
- the proxy typelocator
- the locator
IllegalArgumentException
- if the locator parameter is null
or is invalidpublic static boolean isEJBProxy(Object object)
object
- the object to test
true
if it is an EJB proxy, false
otherwisepublic static <T> StatefulEJBLocator<T> createSession(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName) throws Exception
viewType
- the view typeappName
- the application namemoduleName
- the module namebeanName
- the EJB namedistinctName
- the module distinct name
Exception
- if an error occurspublic static <T> EJBLocator<? extends T> getLocatorFor(T proxy) throws IllegalArgumentException
proxy
- the proxy
IllegalArgumentException
- if the given proxy is not a valid client proxy instancepublic static UserTransaction getUserTransaction(String targetNodeName)
UserTransaction
object instance which can be used to control transactions on a specific node.
targetNodeName
- the node name
UserTransaction
instance
IllegalStateException
- if the transaction context isn't set or cannot provide a UserTransaction
instance
|
JBoss EJB client 1.0.5.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |