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:
- Initable, java.rmi.Remote, java.io.Serializable, Service
- public class BaseUnicastRemoteService
- extends java.rmi.server.UnicastRemoteObject
- implements Service
A base implementation of an UnicastRemoteObject
as a Turbine Service
.
- Author:
- Daniel Rall
- See Also:
- Serialized Form
Fields inherited from class java.rmi.server.UnicastRemoteObject |
csf, port, portFactoryParamTypes, portParamTypes, serialVersionUID, ssf |
Fields inherited from class java.rmi.server.RemoteServer |
log, logname |
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Method Summary |
org.apache.velocity.runtime.configuration.Configuration |
getConfiguration()
Returns the configuration of this service. |
boolean |
getInit()
Returns initialization status of an Initable. |
InitableBroker |
getInitableBroker()
|
java.util.Properties |
getProperties()
Returns the Properties of this Service. |
ServiceBroker |
getServiceBroker()
|
void |
init()
Performs late initialization of an Initable. |
void |
init(java.lang.Object data)
Performs early initailization of an Initable
During the startup of the system, different objects may be
passed to your class using this method. |
void |
init(javax.servlet.ServletConfig config)
|
protected void |
setInit(boolean value)
|
void |
setInitableBroker(InitableBroker broker)
Provides an Initable with a reference to the InitableBroker
that instantiated this object, so that it can access other
Initables. |
java.lang.String |
setName()
|
void |
setName(java.lang.String name)
ServiceBroker uses this method to pass a Service its name. |
void |
setServiceBroker(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. |
void |
shutdown()
Shuts down this service. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
, clone, exportObject, exportObject, exportObject, exportObject, readObject, reexport, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub, writeObject |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait |
configuration
protected org.apache.velocity.runtime.configuration.Configuration configuration
isInitialized
private boolean isInitialized
initableBroker
private InitableBroker initableBroker
name
private java.lang.String name
properties
private java.util.Properties properties
serviceBroker
private ServiceBroker serviceBroker
BaseUnicastRemoteService
public BaseUnicastRemoteService()
throws java.rmi.RemoteException
getConfiguration
public org.apache.velocity.runtime.configuration.Configuration getConfiguration()
- Returns the configuration of this service.
- Specified by:
getConfiguration
in interface Service
- Returns:
- The configuration of this service.
init
public void init(javax.servlet.ServletConfig config)
throws InitializationException
setInitableBroker
public void setInitableBroker(InitableBroker broker)
- Description copied from interface:
Initable
- Provides an Initable with a reference to the InitableBroker
that instantiated this object, so that it can access other
Initables.
- Specified by:
setInitableBroker
in interface Initable
- Following copied from interface:
org.apache.turbine.services.Initable
- Parameters:
broker
- The InitableBroker that instantiated this object.
getInitableBroker
public InitableBroker getInitableBroker()
init
public void init(java.lang.Object data)
throws InitializationException
- Description copied from interface:
Initable
- Performs early initailization 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:
init
in interface Initable
- Following copied from interface:
org.apache.turbine.services.Initable
- Parameters:
data
- An Object to use for initialization activities.- Throws:
InitializationException,
- if initilaization of this
class was not successful.
init
public void init()
throws InitializationException
- Description copied from interface:
Initable
- Performs 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:
init
in interface Initable
- Following copied from interface:
org.apache.turbine.services.Initable
- Throws:
InitializationException,
- if initialization of this
class was not successful.
setInit
protected void setInit(boolean value)
getInit
public boolean getInit()
- Description copied from interface:
Initable
- Returns initialization status of an Initable.
- Specified by:
getInit
in interface Initable
- Following copied from interface:
org.apache.turbine.services.Initable
- Returns:
- Initialization status of an Initable.
shutdown
public void shutdown()
- Shuts down this service.
- Specified by:
shutdown
in interface Initable
getProperties
public java.util.Properties getProperties()
- Description copied from interface:
Service
- Returns 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:
getProperties
in interface Service
- Following copied from interface:
org.apache.turbine.services.Service
- Returns:
- The properties of this Service.
setName
public void setName(java.lang.String name)
- Description copied from interface:
Service
- ServiceBroker uses this method to pass a Service its name.
Service uses its name to ask the broker for an apropriate set
of Properties.
- Specified by:
setName
in interface Service
- Following copied from interface:
org.apache.turbine.services.Service
- Parameters:
name
- The name of this Service.
setName
public java.lang.String setName()
getServiceBroker
public ServiceBroker getServiceBroker()
setServiceBroker
public void setServiceBroker(ServiceBroker broker)
- Description copied from interface:
Service
- 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.
- Specified by:
setServiceBroker
in interface Service
- Following copied from interface:
org.apache.turbine.services.Service
- Parameters:
broker
- The ServiceBroker that instantiated this object.
Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.