|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.esw.util.SupportObject | +--net.sourceforge.esw.service.AService | +--net.sourceforge.esw.service.ADefaultService
Base class for Jini Service implementors to extend.
Describes the base abilities of a Jini Service within the Services Framework.
All IService instances have push and pull elements to help verify
livliness of the service. Those elements can be exercised using the
ping()
and getHeartbeatGenerator()
methods.
All IService implementors should register themselves during their creational pattern.
For environments that do not have multicast enabled (which Jini uses for discovery), or for enabling Unicast Discovery, create properties using the properties framework in the form of . . .
. . . for as many Unicast Discovered Reggie services you wish to Discover. Multicast will still be used as well as Unicast.hostNameOfAReggieService hostNameOfAReggieService hostNameOfAReggieService . . .
Field Summary | |
protected ClassServer |
classServer
The internal HTTP Class Server for distributing classes. |
protected net.jini.lookup.JoinManager |
joinManager
The JoinManager is a Jini class that provides automated Discovery and Joining of Lookup services. |
protected java.lang.Object |
proxy
The Proxy for this ADefaultService implementor. |
protected net.jini.core.lookup.ServiceID |
serviceID
The ServiceID is a Jini class that provides a unique identifier for a service. |
Fields inherited from class net.sourceforge.esw.service.AService |
bStarted, heartbeatGenerator, priority |
Fields inherited from class net.sourceforge.esw.util.SupportObject |
id, properties, propertyChildren, propertyListeners, vetoableChildren, vetoableListeners |
Fields inherited from interface net.sourceforge.esw.service.IService |
PRIMARY, SECONDARY, TERTIARY, UNAVAILABLE |
Constructor Summary | |
ADefaultService()
Creates a new ADefaultService |
|
ADefaultService(java.lang.Object aId)
Creates a new ADefaultService with the specified id. |
Method Summary | |
void |
die()
Requests that this IService instance to kill itself. |
protected void |
persist(net.jini.core.lookup.ServiceID aID)
Persists the ServiceID returned from Reggie that indicates the unique identifier for this IService instance. |
protected void |
register()
Registers this IService implementor with any discovered Jini lookup services. |
protected void |
register(net.jini.core.entry.Entry[] aInitialAttributes)
Registers this IService implementor with any discovered Jini lookup services. |
protected void |
register(java.lang.Object aProxy)
Registers this IService implementor with any discovered Jini lookup services. |
protected void |
register(java.lang.Object aProxy,
net.jini.core.entry.Entry[] aInitialAttributes)
Registers this IService implementor with any discovered Jini lookup services. |
protected void |
register(java.lang.Object aProxy,
net.jini.core.entry.Entry[] aInitialAttributes,
java.lang.String[] aInitialGroups,
net.jini.core.discovery.LookupLocator[] aInitialLocators)
Registers this IService implementor with any discovered Jini lookup services. |
protected net.jini.core.lookup.ServiceID |
restore()
Restores the ServiceID that indicates the unique identifier for this IService instance within Reggie. |
Methods inherited from class net.sourceforge.esw.service.AService |
getHeartbeatGenerator, getPriority, isSane, isStarted, ping, setPriority, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sourceforge.esw.service.IService |
getHeartbeatGenerator, getPriority, isSane, isStarted, ping, setPriority, start, stop |
Methods inherited from interface net.sourceforge.esw.util.ISupportObject |
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getID, getProperty, getPropertySize, propertyKeys, removeProperty, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener, setID, setProperty |
Field Detail |
protected java.lang.Object proxy
protected net.jini.lookup.JoinManager joinManager
protected net.jini.core.lookup.ServiceID serviceID
protected ClassServer classServer
Constructor Detail |
public ADefaultService()
public ADefaultService(java.lang.Object aId)
aID
- the name of this ADefaultServiceMethod Detail |
public void die()
This default implementation calls System.exit(0)
.
Fires an IServiceResources.DIE_PROPERTY property change event.
die
in interface IService
die
in class AService
protected void register(java.lang.Object aProxy, net.jini.core.entry.Entry[] aInitialAttributes, java.lang.String[] aInitialGroups, net.jini.core.discovery.LookupLocator[] aInitialLocators) throws java.io.IOException
aProxy
- the Proxy to be registered with the Jini lookup service.aInitialAttributes
- the array of Entries that describe this IService
implementor.aInitialGroups
- the array of lookup groups to find and join.aInitialLocators
- the array of LookupLocators for UnicastDiscovery
of lookup services.protected void register(java.lang.Object aProxy, net.jini.core.entry.Entry[] aInitialAttributes) throws java.io.IOException
This register method will register with all lookup services it can discover.
aProxy
- the Proxy to be registered with the Jini lookup service.aInitialAttributes
- the array of Entries that describe this IService
implementor.protected void register(net.jini.core.entry.Entry[] aInitialAttributes) throws java.lang.Exception
This register method will register with all lookup services it can discover.
aInitialAttributes
- the array of Entries that describe this IService
implementor.protected void register(java.lang.Object aProxy) throws java.io.IOException
This register method will register with all lookup services it can discover.
aProxy
- the Proxy to be registered with the Jini lookup service.protected void register() throws java.lang.Exception
This register method will register with all lookup services it can discover.
protected net.jini.core.lookup.ServiceID restore()
protected void persist(net.jini.core.lookup.ServiceID aID)
aID
- the ServiceID for this IService instance.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |