Package org.apache.turbine.services
Class BaseUnicastRemoteService
- java.lang.Object
- 
- java.rmi.server.RemoteObject
- 
- java.rmi.server.RemoteServer
- 
- java.rmi.server.UnicastRemoteObject
- 
- org.apache.turbine.services.BaseUnicastRemoteService
 
 
 
 
- 
- All Implemented Interfaces:
- Serializable,- Remote,- Initable,- Service
 
 public class BaseUnicastRemoteService extends UnicastRemoteObject implements Service A base implementation of anUnicastRemoteObjectas a TurbineService.- Author:
- Daniel Rall
- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected org.apache.commons.configuration2.Configurationconfiguration- 
Fields inherited from class java.rmi.server.RemoteObjectref
 - 
Fields inherited from interface org.apache.turbine.services.ServiceSERVICE_NAME
 
- 
 - 
Constructor SummaryConstructors Constructor Description BaseUnicastRemoteService()Default constructor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.commons.configuration2.ConfigurationgetConfiguration()Returns the configuration of this service.booleangetInit()Returns initialization status of an Initable.InitableBrokergetInitableBroker()Get theInitableBrokerinstanceStringgetName()Returns the name of this Service.PropertiesgetProperties()Returns the Properties of this Service.ServiceBrokergetServiceBroker()Get theServiceBrokerinstancevoidinit()Performs late initialization of an Initable.voidinit(Object data)Performs early initialization of an Initable During the startup of the system, different objects may be passed to your class using this method.protected voidsetInit(boolean value)voidsetInitableBroker(InitableBroker broker)Provides an Initable with a reference to the InitableBroker that instantiated this object, so that it can access other Initables.voidsetName(String name)ServiceBroker uses this method to pass a Service its name.voidsetServiceBroker(ServiceBroker broker)Provides a Service with a reference to the ServiceBroker that instantiated this object, so that it can ask for its properties and access other Services.voidshutdown()Shuts down this service.- 
Methods inherited from class java.rmi.server.UnicastRemoteObjectclone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
 - 
Methods inherited from class java.rmi.server.RemoteServergetClientHost, getLog, setLog
 
- 
 
- 
- 
- 
Field Detail- 
configurationprotected org.apache.commons.configuration2.Configuration configuration 
 
- 
 - 
Constructor Detail- 
BaseUnicastRemoteServicepublic BaseUnicastRemoteService() throws RemoteException Default constructor- Throws:
- RemoteException- if the remote object cannot be created
 
 
- 
 - 
Method Detail- 
getConfigurationpublic org.apache.commons.configuration2.Configuration getConfiguration() Returns the configuration of this service.- Specified by:
- getConfigurationin interface- Service
- Returns:
- The configuration of this service.
 
 - 
setInitableBrokerpublic void setInitableBroker(InitableBroker broker) Description copied from interface:InitableProvides an Initable with a reference to the InitableBroker that instantiated this object, so that it can access other Initables.- Specified by:
- setInitableBrokerin interface- Initable
- Parameters:
- broker- The InitableBroker that instantiated this object.
 
 - 
getInitableBrokerpublic InitableBroker getInitableBroker() Get theInitableBrokerinstance- Returns:
- the broker instance
 
 - 
initpublic void init(Object data) throws InitializationException Description copied from interface:InitablePerforms early initialization of an Initable During the startup of the system, different objects may be passed to your class using this method. It should ignore any objects that it doesn't need or understand. After the class changes its internal state so that getInit() returns true, this method will be called no more, and late initialization will not be performed. If your class relies on early initialization, and the object it expects was not received, you can use late initialization to throw an exception and complain.- Specified by:
- initin interface- Initable
- Parameters:
- data- An Object to use for initialization activities.
- Throws:
- InitializationException- if initialization of this class was not successful.
 
 - 
initpublic void init() throws InitializationException Description copied from interface:InitablePerforms late initialization of an Initable. When your class is being requested from an InitableBroker, it will call getInit(), and if it returns false, this method will be invoked.- Specified by:
- initin interface- Initable
- Throws:
- InitializationException- if initialization of this class was not successful.
 
 - 
setInitprotected void setInit(boolean value) 
 - 
getInitpublic boolean getInit() Description copied from interface:InitableReturns initialization status of an Initable.
 - 
shutdownpublic void shutdown() Shuts down this service.
 - 
getPropertiespublic Properties getProperties() Description copied from interface:ServiceReturns the Properties of this Service. Every Service has at least one property, which is "classname", containing the name of the class implementing this service. Note that the service may chose to alter its properties, therefore they may be different from those returned by ServiceBroker.- Specified by:
- getPropertiesin interface- Service
- Returns:
- The properties of this Service.
 
 - 
setNamepublic void setName(String name) Description copied from interface:ServiceServiceBroker uses this method to pass a Service its name. Service uses its name to ask the broker for an apropriate set of Properties.
 - 
getNamepublic String getName() Description copied from interface:ServiceReturns the name of this Service.
 - 
getServiceBrokerpublic ServiceBroker getServiceBroker() Get theServiceBrokerinstance- Returns:
- the broker instance
 
 - 
setServiceBrokerpublic void setServiceBroker(ServiceBroker broker) Description copied from interface:ServiceProvides a Service with a reference to the ServiceBroker that instantiated this object, so that it can ask for its properties and access other Services.- Specified by:
- setServiceBrokerin interface- Service
- Parameters:
- broker- The ServiceBroker that instantiated this object.
 
 
- 
 
-