jaugment2.speech
Class SemiNaturalVoiceProcessorService
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--jaugment2.jini.simpleService.simpleService
|
+--jaugment2.speech.SemiNaturalVoiceProcessorService
- public class SemiNaturalVoiceProcessorService
- extends simpleService
- implements java.rmi.Remote, net.jini.discovery.DiscoveryListener, SemiNaturalInputProcessing, LookupEventListener
A Service doing processing of semi-natural sproken sentences.
It connects to (a) speechRecognizing(s) and processes their output
for command-word-combinations registred by listeners.
It shalll support dictations and questions by the listeners later.
- 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,
serialVersionUID |
| Fields inherited from class java.rmi.server.RemoteObject |
ref,
serialVersionUID |
| Methods inherited from class jaugment2.jini.simpleService.simpleService |
,
deinit,
deinitBindings,
finalize,
getProxy,
getServiceItem,
getStorageLocation,
init,
initBindings,
initBindings,
load,
save,
setStorageLocation |
| 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 |
getClass,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
debugMessages
private static final boolean debugMessages
myproxy
private SemiNaturalVoiceProcessorProxy myproxy
root
private SemiNaturalVoiceProcessorService.parseTreeKnot root
- the root of our parse-tree
simpleLeaselistener
private SimpleLandlord.LeaseListener simpleLeaselistener
- Helper-class for our Landlord.
landLord
private SimpleLandlord landLord
SemiNaturalVoiceProcessorService
public SemiNaturalVoiceProcessorService()
throws java.rmi.RemoteException
SemiNaturalVoiceProcessorService
public SemiNaturalVoiceProcessorService(net.jini.core.discovery.LookupLocator locallocator)
throws java.rmi.RemoteException
ServiceFoundEvent
public void ServiceFoundEvent(LookupEventEvent e)
- Specified by:
- ServiceFoundEvent in interface LookupEventListener
ServiceGoneEvent
public void ServiceGoneEvent(LookupEventEvent e)
- Specified by:
- ServiceGoneEvent in interface LookupEventListener
ServiceChangedEvent
public void ServiceChangedEvent(LookupEventEvent e)
- Specified by:
- ServiceChangedEvent in interface LookupEventListener
loadMe
private void loadMe()
- Load our state (e.g. attrubutes, service-id) from persistent storage
discovered
public void discovered(net.jini.discovery.DiscoveryEvent e)
- Called when one or more lookup service registrars has been discovered.
The method should return quickly; e.g., it should not make remote
calls.
- Specified by:
- discovered in interface net.jini.discovery.DiscoveryListener
- Parameters:
e - the event that describes the discovered registrars
discarded
public void discarded(net.jini.discovery.DiscoveryEvent e)
- Called when one or more lookup service registrars has been discarded.
The method should return quickly; e.g., it should not make remote
calls.
- Specified by:
- discarded in interface net.jini.discovery.DiscoveryListener
- Parameters:
e - the event that describes the discarded registrars
restart
public void restart()
throws java.lang.Exception
- restart this service once it has been stopped
- Overrides:
- restart in class simpleService
- See Also:
stop
stop
public void stop(boolean exit)
throws java.lang.Exception
- stop this service. If exit is false all references to this
service are still valid but it has deregistered everywhere.
(this includes the RMI-activation-daemon)
- Overrides:
- stop in class simpleService
- Parameters:
exit - stop running- See Also:
restart,
destroy
destroy
public void destroy()
throws java.rmi.RemoteException
- stop this service, destroy any persistent storage and exit
- Overrides:
- destroy in class simpleService
addSentenceParsedListener
public net.jini.core.lease.Lease addSentenceParsedListener(net.jini.core.event.RemoteEventListener listener,
java.rmi.MarshalledObject handback,
java.lang.String registerfor)
throws java.rmi.RemoteException,
net.jini.core.lease.LeaseDeniedException,
java.lang.IllegalStateException
- Subscribe for buffer-eddings, removals and changes
registerfor is of type EXPR
EXPR := [WORD | '*' | EXPR ' ' EXPR]
WORD := any character exept ' '
- Specified by:
- addSentenceParsedListener in interface SemiNaturalInputProcessing
parseSentence
public void parseSentence(java.lang.String sentence,
SemiNaturalInputProcessing.Answerable a)
throws java.rmi.RemoteException
- Pase the given sentence and react to it.
- Specified by:
- parseSentence in interface SemiNaturalInputProcessing