org.astrogrid.warehouse.service
Class GridServiceDelegate

Direct Known Subclasses:
GdsDelegate

public class GridServiceDelegate


Method Summary
 voidclearErrors()
          Clears previously-caught exceptions, causing the object to behave as
if it has not yet caught an exception.
 StringgetErrorMessage()
          Returns the error message from the last exception to be caught,
or "OK" if no exception has yet been caught.
 StringgetFactoryHandle()
          Returns the Grid Service Handle for the factory that will make
the service instance managed by this delegate.
 StringgetInstanceHandle()
          Return the Grid Service Handle for the service instance.
 booleangetThrowsExceptions()
          Determines whether this delegate throws exceptions
(the alternative is to catch the exceptions and to present
their messages through the bean properties).
 booleanisConnected()
          Talks to the service and checks whether an instance is
connected to the delegate.
 booleanisFailed()
          Indicates whether this delegate has caught an exception
since construction or since the last call to clearErrors.
 booleanisSimulating()
          Reports whether the delegate is simulating the
link with its service.
 voidreportError(Exception e)
          Reports a given exception, either by throwing it or storing
it in the error property, according to the state of the
throwsException property.
 voidsetFactoryHandle(String factoryHandle)
          Sets the Grid Service Handle for the factory that will make the
service instance managed by this delegate.
 voidsetSimulating(boolean simulating)
          Sets the flag for simulation of the link with the
delegate's service.
 voidsetThrowsExceptions(boolean throwsExceptions)
          Specifies whether this delegate throws exceptions (the alternative is to catch the exceptions and to present
their messages through the bean properties).

Method Detail

clearErrors

public void clearErrors()
Clears previously-caught exceptions, causing the object to behave as
if it has not yet caught an exception.

getErrorMessage

public String getErrorMessage()
Returns the error message from the last exception to be caught,
or "OK" if no exception has yet been caught.

getFactoryHandle

public String getFactoryHandle()
Returns the Grid Service Handle for the factory that will make
the service instance managed by this delegate.

getInstanceHandle

public String getInstanceHandle()
throws java.lang.Exception
Return the Grid Service Handle for the service instance.

getThrowsExceptions

public boolean getThrowsExceptions()
Determines whether this delegate throws exceptions
(the alternative is to catch the exceptions and to present
their messages through the bean properties).

isConnected

public boolean isConnected()
Talks to the service and checks whether an instance is
connected to the delegate.
Returns: true if there is an instance connected; false otherwise.

isFailed

public boolean isFailed()
Indicates whether this delegate has caught an exception
since construction or since the last call to clearErrors.

isSimulating

public boolean isSimulating()
Reports whether the delegate is simulating the
link with its service. The meaning of simulation
depends on the sub-classes of this class.

reportError

public void reportError(Exception e)
throws java.lang.Exception
Reports a given exception, either by throwing it or storing
it in the error property, according to the state of the
throwsException property.

setFactoryHandle

public void setFactoryHandle(String factoryHandle)
Sets the Grid Service Handle for the factory that will make the
service instance managed by this delegate.

setSimulating

public void setSimulating(boolean simulating)
Sets the flag for simulation of the link with the
delegate's service. The interpretation of this flag
is determined by the subclasses of this class.

setThrowsExceptions

public void setThrowsExceptions(boolean throwsExceptions)
Specifies whether this delegate throws exceptions (the alternative is to catch the exceptions and to present
their messages through the bean properties).

Association Links

to Class java.lang.String

The Grid Service Handle for the service's factory.
Since this code is built for Globus Toolkit 3,
the handle is expected to be a URL.

to Class java.rmi.Remote

to Class java.lang.Exception