com.sun.jini.compat.admin2
Class ServiceDestroyer
java.lang.Object
com.sun.jini.compat.admin2.ServiceDestroyer
- public class ServiceDestroyer
- extends java.lang.Object
This class provides static methods that can be used to destroy a service.
Method Summary |
static int |
destroy(java.lang.Object service)
Administratively destroys the service referenced by the input
parameter. |
static int |
destroy(SharedActivatableServiceDescriptor.Created created,
int nSecsWait)
Administratively destroys the service referenced by the
proxy parameter, which is assumed to be running
under a shared VM environment. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DESTROY_SUCCESS
public static final int DESTROY_SUCCESS
- See Also:
- Constant Field Values
SERVICE_NOT_ADMINISTRABLE
public static final int SERVICE_NOT_ADMINISTRABLE
- See Also:
- Constant Field Values
SERVICE_NOT_DESTROY_ADMIN
public static final int SERVICE_NOT_DESTROY_ADMIN
- See Also:
- Constant Field Values
DEACTIVATION_TIMEOUT
public static final int DEACTIVATION_TIMEOUT
- See Also:
- Constant Field Values
PERSISTENT_STORE_EXISTS
public static final int PERSISTENT_STORE_EXISTS
- See Also:
- Constant Field Values
ServiceDestroyer
public ServiceDestroyer()
destroy
public static int destroy(java.lang.Object service)
throws java.rmi.RemoteException
- Administratively destroys the service referenced by the input
parameter. The service input to this method must implement
both
net.jini.admin.Administrable
and the
com.sun.jini.admin.DestroyAdmin
interfaces
in order for this method to successfully destroy the service.
- Parameters:
service
- reference to the service to destroy
- Returns:
int
value that indicates either success or
one of a number of possible reasons for failure to destroy
the service. Possible values are:
- ServiceDestroyer.DESTROY_SUCCESS
- ServiceDestroyer.SERVICE_NOT_ADMINISTRABLE - returned when
the service to destroy is not an instance of
net.jini.admin.Administrable
- ServiceDestroyer.SERVICE_NOT_DESTROY_ADMIN - returned when
the service to destroy is not an instance of
com.sun.jini.admin.DestroyAdmin
- Throws:
java.rmi.RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
service's backend. When this exception does occur, the
service may or may not have been successfully destroyed.
destroy
public static int destroy(SharedActivatableServiceDescriptor.Created created,
int nSecsWait)
throws java.rmi.RemoteException,
java.rmi.activation.ActivationException
- Administratively destroys the service referenced by the
proxy
parameter, which is assumed to be running
under a shared VM environment. This method attempts to verify
that the desired service is indeed destroyed by verifying that
the service's activation information/descriptor is no longer
registered with the activation system.
- Parameters:
created
- the id of the activation group in which the service to
destroy is registered, the activation ID of the
service to destroy, and the reference to the service
to destroynSecsWait
- the number of seconds to wait for the service's
activation descriptor to be no longer registered with
the activation system
- Returns:
int
value that indicates either success or
one of a number of possible reasons for failure to destroy
the service. Possible values are:
- ServiceDestroyer.DESTROY_SUCCESS
- ServiceDestroyer.SERVICE_NOT_ADMINISTRABLE - returned when
the service to destroy is not an instance of
net.jini.admin.Administrable
- ServiceDestroyer.SERVICE_NOT_DESTROY_ADMIN - returned when
the service to destroy is not an instance of
com.sun.jini.admin.DestroyAdmin
- ServiceDestroyer.DEACTIVATION_TIMEOUT - returned when the
service's activation descriptor is still registered with the
activation system after the number of seconds to wait have passed
- ServiceDestroyer.PERSISTENT_STORE_EXISTS - returned when the
directory in which the service stores its persistent state
still exists after the service has been successfully destroyed
- Throws:
java.rmi.RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
service's backend. When this exception does occur, the
service may or may not have been successfully destroyed.
java.rmi.activation.ActivationException
- typically, this
exception occurs when problems arise while attempting to
interact with the activation system
Copyright 2005, Sun Microsystems, Inc.
Licensed under the Apache License, Version 2.0.