|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.astrogrid.acr.Finder
public class Finder
Connect to an AstroRuntime Instance using RMI. The Astro Runtime instance is found by
Connecting to AstroRuntime
import org.astrogrid.acr.builtin.ACR; import org.astrogrid.acr.Finder; Finder f = new Finder(); ACR acr = f.find(); // find the AR
How to retrieve services from the ACR interface| Constructor Summary | |
|---|---|
Finder()
Construct a new Finder |
|
| Method Summary | |
|---|---|
static File |
configurationFile()
The AR RMI connection file. |
ACR |
find()
Find or create an Astro Runtime (AR) instance. |
ACR |
find(boolean tryToStartIfNotRunning,
boolean warnUserBeforeStarting)
Find or create an Astro Runtime (AR) instance. |
ACR |
findSession(String sessionId)
Find an Astro Runtime instance for a specific session. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Finder()
| Method Detail |
|---|
public ACR find()
throws ACRException
findSession(true,false)
ACRException - if all options fail
public ACR findSession(String sessionId)
throws InvalidArgumentException,
NotApplicableException,
ServiceException
Finder.find() this method will not start the Astro Runtime service if it is
not already running - the Astro Runtime must be running first.
sessionId - the identifier of a current sessionSessionManager
InvalidArgumentException - if the sessionId is invalid.
NotApplicableException - if a connection has not already been made to an AR instance, or AR is an older version without session support
ServiceException - if there is an error connecting to this session.
public ACR find(boolean tryToStartIfNotRunning,
boolean warnUserBeforeStarting)
throws ACRException
tryToStartIfNotRunning - if false, will not attempt to start an AR, but instead will return NULL if there isn't an instance already runningwarnUserBeforeStarting - if true, will warn the user before attempting to start an AR, giving them the chance to start one manuallyFinder.find()
ACRExceptionpublic static final File configurationFile()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||