|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--com.kedwards.swt.UnicastServiceBackend
UnicastServiceBackend.java
This is the most common implementation of ServiceBackend--one that uses the simple RMI UnicastRemoteObject class to handle remoteness and communication with its proxy.
See http://www.kedwards.com/jini
No warranty expressed or implied; use at your own risk; for educational purposes only.
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
UnicastServiceBackend()
|
|
| Method Summary | |
java.lang.Object |
getAdmin()
Returns an administrative object for the service. |
void |
getCheckpointData(TaggedPersistentData data)
Subclasses should override this to add any data they need to be checkpointed to the data object. |
net.jini.core.entry.Entry[] |
getInitialAttributes()
Return the set of entries that will initially be associated with this service. |
java.lang.String[] |
getInitialGroups()
Return the set of groups that this service should initially discover. |
net.jini.core.discovery.LookupLocator[] |
getInitialLocators()
Return the set of locators that this service should initially discover. |
abstract java.lang.Object |
getProxy()
Subclasses should override this method to return the proxy for their service. |
net.jini.core.lookup.ServiceID |
getServiceID()
Returns the service ID, once it is known. |
java.lang.String |
getServiceName()
Unless overridden by a subclass, this returns the de-packaged name of the class. |
ServiceWrapper |
getServiceWrapper()
Gets the current service wrapper. |
abstract void |
initialize()
Called the first time the service is ever run. |
abstract void |
postInitialize()
Called as soon as a ServiceID is available |
abstract void |
preInitialize()
Called as soon as the wrapper is set. |
void |
setCheckpointData(TaggedPersistentData data)
Subclasses should override this to retrieve any data that they need to set their state, after a restoration. |
void |
setServiceID(net.jini.core.lookup.ServiceID serviceID)
Final because subclasses should do their initialization in postInitialize |
void |
setServiceWrapper(ServiceWrapper wrapper)
Final because subclasses should do their initialization in preInitialize |
abstract void |
shutdown()
Called when the service must be terminated |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, 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 |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public UnicastServiceBackend()
throws java.rmi.RemoteException
| Method Detail |
public final void setServiceWrapper(ServiceWrapper wrapper)
setServiceWrapper in interface ServiceBackend
public void getCheckpointData(TaggedPersistentData data)
throws java.io.IOException
getCheckpointData in interface Checkpointeddata - The persistent data to which the service should write
any data it wishes to be checkpointed.
public void setCheckpointData(TaggedPersistentData data)
throws java.io.IOException,
java.lang.ClassNotFoundException
setCheckpointData in interface Checkpointeddata - The persistent data from which the service should
recover its state.public java.lang.String getServiceName()
getServiceName in interface ServiceBackendcom.kedwards.swt.ServiceBackendpublic ServiceWrapper getServiceWrapper()
ServiceBackendgetServiceWrapper in interface ServiceBackend
public java.lang.Object getAdmin()
throws java.rmi.RemoteException
getAdmin in interface ServiceBackendcom.kedwards.swt.ServiceBackend
public abstract java.lang.Object getProxy()
throws java.rmi.RemoteException
getProxy in interface ServiceBackendcom.kedwards.swt.ServiceBackend
public abstract void preInitialize()
throws java.lang.Exception
preInitialize in interface ServiceBackend
public abstract void initialize()
throws java.lang.Exception
initialize in interface ServiceBackend
public abstract void postInitialize()
throws java.lang.Exception
postInitialize in interface ServiceBackendpublic abstract void shutdown()
shutdown in interface ServiceBackendpublic net.jini.core.discovery.LookupLocator[] getInitialLocators()
getInitialLocators in interface ServiceBackendpublic java.lang.String[] getInitialGroups()
getInitialGroups in interface ServiceBackendpublic net.jini.core.entry.Entry[] getInitialAttributes()
getInitialAttributes in interface ServiceBackendpublic final void setServiceID(net.jini.core.lookup.ServiceID serviceID)
setServiceID in interface ServiceBackend
public net.jini.core.lookup.ServiceID getServiceID()
throws NoServiceIDException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||