com.gridsystems.innergrid.api
Class ApiFactory

java.lang.Object
  extended by com.gridsystems.innergrid.api.ApiFactory

public final class ApiFactory
extends java.lang.Object

Helper class able to create API instances, through newApi.

Version:
1.0
Author:
Xmas

Method Summary
static com.gridsystems.innergrid.api.ApiFactory.Api[] getAllApis()
          Gets a list of all APIs.
static
<T extends java.rmi.Remote>
T
newApi(java.lang.Class<T> iface, Connection con)
          Gets an instance of an API for the specified remote interface and connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAllApis

public static com.gridsystems.innergrid.api.ApiFactory.Api[] getAllApis()
Gets a list of all APIs.

Returns:
returns an array of Apis with the list of all registered API wrappers

newApi

public static <T extends java.rmi.Remote> T newApi(java.lang.Class<T> iface,
                                                   Connection con)
                                        throws KernelException
Gets an instance of an API for the specified remote interface and connection.

Type Parameters:
T - Remote Class.
Parameters:
iface - the interface that the returned instance must implement
con - the connection to use to create the Api
Returns:
an instance of the specified API implementation
Throws:
KernelException - CLT011 if the connection is null
KernelException - CLT015 if the interface is null, if is not registered, or if instantiation fails


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.