Rio Project 4.2 API Documentation



org.rioproject.resources.servicecore
Class ServiceAdminProxy

java.lang.Object
  extended by org.rioproject.resources.servicecore.ServiceAdminProxy
All Implemented Interfaces:
DestroyAdmin, Serializable, Remote, JoinAdmin, ReferentUuid, ServiceBeanAdmin, ServiceBeanControl, ServiceAdmin
Direct Known Subclasses:
ConstrainableServiceAdminProxy, CybernodeAdminProxy, ProvisionMonitorAdminProxy

public class ServiceAdminProxy
extends Object
implements ServiceAdmin, ReferentUuid, Serializable

A ServiceAdminProxy is a proxy for the ServiceAdmin server. This is the object passed to clients of the ServiceAdmin.

Author:
Dennis Reedy
See Also:
Serialized Form

Field Summary
protected  ServiceAdmin serviceAdmin
          The backend
protected  Uuid uuid
          The unique identifier for this proxy
 
Constructor Summary
protected ServiceAdminProxy(ServiceAdmin serviceAdmin, Uuid uuid)
           
 
Method Summary
 void addLookupAttributes(Entry[] attrSets)
           
 void addLookupGroups(String[] groups)
           
 void addLookupLocators(LookupLocator[] locators)
           
 void advertise()
          The advertise method informs a ServiceBean to advertise itself on the network providing access to all clients.
 void destroy()
           
 boolean equals(Object o)
          Proxies for servers with the same uuid are considered equal.
 ServiceRegistrar[] getJoinSet()
          Returns an array of instances of ServiceRegistrar, each corresponding to a lookup service with which the service is currently registered (joined)
 Entry[] getLookupAttributes()
           
 String[] getLookupGroups()
           
 LookupLocator[] getLookupLocators()
           
 Uuid getReferentUuid()
           
 Uuid getServiceBeanInstantiatorUuid()
          Get the Uuid of the ServiceBeanInstantiator the ServiceBean is being hosted by
 ServiceElement getServiceElement()
          Get the ServiceElement for the ServiceBean
 long getUpTime()
          How long the service has been running
 int hashCode()
          Proxies for servers with the same uuid have the same hash code.
 void modifyLookupAttributes(Entry[] attrSetTemplates, Entry[] attrSets)
           
 void removeLookupGroups(String[] groups)
           
 void removeLookupLocators(LookupLocator[] locators)
           
 void setLookupGroups(String[] groups)
           
 void setLookupLocators(LookupLocator[] locators)
           
 void setServiceElement(ServiceElement sElem)
          Set the ServiceElement for the ServiceBean
 Object start()
          The start method provides informs a ServiceBean to make itself ready to accept inbound communications, returning an Object which can be used to communicate with the ServiceBean.
 void stop(boolean force)
          The stop method informs the ServiceBean to unexport itself from any underlying distributed Object communication mechanisms making it incapable of accepting inbound communications.
 void unadvertise()
          The unadvertise method informs the ServiceBean to cancel all advertisements (registrations, etc...) it has made on the network.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceAdmin

protected final ServiceAdmin serviceAdmin
The backend


uuid

protected final Uuid uuid
The unique identifier for this proxy

Constructor Detail

ServiceAdminProxy

protected ServiceAdminProxy(ServiceAdmin serviceAdmin,
                            Uuid uuid)
Method Detail

getJoinSet

public ServiceRegistrar[] getJoinSet()
                              throws RemoteException
Description copied from interface: ServiceAdmin
Returns an array of instances of ServiceRegistrar, each corresponding to a lookup service with which the service is currently registered (joined)

Specified by:
getJoinSet in interface ServiceAdmin
Returns:
An array of ServiceRegistrar instances
Throws:
RemoteException - If communication errors occur
See Also:
ServiceAdmin.getJoinSet()

getServiceElement

public ServiceElement getServiceElement()
                                 throws RemoteException
Description copied from interface: ServiceBeanAdmin
Get the ServiceElement for the ServiceBean

Specified by:
getServiceElement in interface ServiceBeanAdmin
Returns:
The ServiceElement
Throws:
RemoteException - If communication errors occur
See Also:
ServiceBeanAdmin.getServiceElement()

setServiceElement

public void setServiceElement(ServiceElement sElem)
                       throws RemoteException
Description copied from interface: ServiceBeanAdmin
Set the ServiceElement for the ServiceBean

Specified by:
setServiceElement in interface ServiceBeanAdmin
Parameters:
sElem - The ServiceElement
Throws:
RemoteException - If communication errors occur
See Also:
ServiceBeanAdmin.setServiceElement(org.rioproject.core.ServiceElement)

getUpTime

public long getUpTime()
               throws RemoteException
Description copied from interface: ServiceBeanAdmin
How long the service has been running

Specified by:
getUpTime in interface ServiceBeanAdmin
Returns:
The amount of time (in milliseconds) the servie has been "up" (running)
Throws:
RemoteException - If communication errors occur
See Also:
ServiceBeanAdmin.getUpTime()

getServiceBeanInstantiatorUuid

public Uuid getServiceBeanInstantiatorUuid()
                                    throws RemoteException
Description copied from interface: ServiceBeanAdmin
Get the Uuid of the ServiceBeanInstantiator the ServiceBean is being hosted by

Specified by:
getServiceBeanInstantiatorUuid in interface ServiceBeanAdmin
Returns:
The Uuid of the ServiceBeanInstantiator the ServiceBean is being hosted by
Throws:
RemoteException - If communication errors occur

start

public Object start()
             throws JSBControlException,
                    RemoteException
Description copied from interface: ServiceBeanControl
The start method provides informs a ServiceBean to make itself ready to accept inbound communications, returning an Object which can be used to communicate with the ServiceBean. If the ServiceBean has started itself, subsequent invocations of this method will not re-start the ServiceBean, but return the Object created during the initial start

Specified by:
start in interface ServiceBeanControl
Returns:
An Object that can be used to communicate to the ServiceBean
Throws:
JSBControlException - If any errors occur
RemoteException - If any communications errors occur
See Also:
ServiceBeanControl.start()

stop

public void stop(boolean force)
          throws JSBControlException,
                 RemoteException
Description copied from interface: ServiceBeanControl
The stop method informs the ServiceBean to unexport itself from any underlying distributed Object communication mechanisms making it incapable of accepting inbound communications. This call should be used with great care as the ServiceBean will not be able to respond to any remote invocations.

Specified by:
stop in interface ServiceBeanControl
Parameters:
force - If true, unexports the ServiceBean even if there are pending or in-progress calls; if false, only unexports the ServiceBean if there are no pending or in-progress calls
Throws:
JSBControlException - If any errors occur
RemoteException - If any communications errors occur
See Also:
ServiceBeanControl.stop(boolean)

advertise

public void advertise()
               throws JSBControlException,
                      RemoteException
Description copied from interface: ServiceBeanControl
The advertise method informs a ServiceBean to advertise itself on the network providing access to all clients. The ServiceBean must be ready to accept incoming communications (has been started). If the ServiceBean has advertised itself, subsequent invocations of this method will not re-advertise the ServiceBean

Specified by:
advertise in interface ServiceBeanControl
Throws:
JSBControlException - If any errors occur
RemoteException - If any communications errors occur
See Also:
ServiceBeanControl.advertise()

unadvertise

public void unadvertise()
                 throws JSBControlException,
                        RemoteException
Description copied from interface: ServiceBeanControl
The unadvertise method informs the ServiceBean to cancel all advertisements (registrations, etc...) it has made on the network. The ServiceBean must still be available to accept incoming communications. If the ServiceBean has not advertised itself, this method has no defined behavior

Specified by:
unadvertise in interface ServiceBeanControl
Throws:
JSBControlException - If any errors occur
RemoteException - If any communications errors occur
See Also:
ServiceBeanControl.unadvertise()

getLookupAttributes

public Entry[] getLookupAttributes()
                            throws RemoteException
Specified by:
getLookupAttributes in interface JoinAdmin
Throws:
RemoteException
See Also:
JoinAdmin.getLookupAttributes()

addLookupAttributes

public void addLookupAttributes(Entry[] attrSets)
                         throws RemoteException
Specified by:
addLookupAttributes in interface JoinAdmin
Throws:
RemoteException
See Also:
JoinAdmin.addLookupAttributes(net.jini.core.entry.Entry[])

modifyLookupAttributes

public void modifyLookupAttributes(Entry[] attrSetTemplates,
                                   Entry[] attrSets)
                            throws RemoteException
Specified by:
modifyLookupAttributes in interface JoinAdmin
Throws:
RemoteException
See Also:
JoinAdmin.modifyLookupAttributes(net.jini.core.entry.Entry[], net.jini.core.entry.Entry[])

getLookupGroups

public String[] getLookupGroups()
                         throws RemoteException
Specified by:
getLookupGroups in interface JoinAdmin
Throws:
RemoteException
See Also:
JoinAdmin.getLookupGroups()

addLookupGroups

public void addLookupGroups(String[] groups)
                     throws RemoteException
Specified by:
addLookupGroups in interface JoinAdmin
Throws:
RemoteException
See Also:
JoinAdmin.addLookupGroups(java.lang.String[])

removeLookupGroups

public void removeLookupGroups(String[] groups)
                        throws RemoteException
Specified by:
removeLookupGroups in interface JoinAdmin
Throws:
RemoteException
See Also:
JoinAdmin.removeLookupGroups(java.lang.String[])

setLookupGroups

public void setLookupGroups(String[] groups)
                     throws RemoteException
Specified by:
setLookupGroups in interface JoinAdmin
Throws:
RemoteException
See Also:
JoinAdmin.setLookupGroups(java.lang.String[])

getLookupLocators

public LookupLocator[] getLookupLocators()
                                  throws RemoteException
Specified by:
getLookupLocators in interface JoinAdmin
Throws:
RemoteException
See Also:
JoinAdmin.getLookupLocators()

addLookupLocators

public void addLookupLocators(LookupLocator[] locators)
                       throws RemoteException
Specified by:
addLookupLocators in interface JoinAdmin
Throws:
RemoteException
See Also:
JoinAdmin.addLookupLocators(net.jini.core.discovery.LookupLocator[])

removeLookupLocators

public void removeLookupLocators(LookupLocator[] locators)
                          throws RemoteException
Specified by:
removeLookupLocators in interface JoinAdmin
Throws:
RemoteException
See Also:
JoinAdmin.removeLookupLocators(net.jini.core.discovery.LookupLocator[])

setLookupLocators

public void setLookupLocators(LookupLocator[] locators)
                       throws RemoteException
Specified by:
setLookupLocators in interface JoinAdmin
Throws:
RemoteException
See Also:
JoinAdmin.setLookupLocators(net.jini.core.discovery.LookupLocator[])

destroy

public void destroy()
             throws RemoteException
Specified by:
destroy in interface DestroyAdmin
Throws:
RemoteException
See Also:
DestroyAdmin.destroy()

hashCode

public int hashCode()
Proxies for servers with the same uuid have the same hash code.

Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Proxies for servers with the same uuid are considered equal.

Overrides:
equals in class Object

getReferentUuid

public Uuid getReferentUuid()
Specified by:
getReferentUuid in interface ReferentUuid
See Also:
ReferentUuid.getReferentUuid()

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.