Package org.vrspace.server.obj
Class Bot
java.lang.Object
org.vrspace.server.obj.Entity
org.vrspace.server.obj.VRObject
org.vrspace.server.obj.Client
org.vrspace.server.obj.User
org.vrspace.server.obj.Bot
A Bot is a Client that has no session. It does have own scene, and observes all events in the scene. It also responds to
something that user(s) write. Bots are configured in application.properties file, and instantiated by BotManager on server
startup.
- Author:
- joe
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanAvailable avatar animations, loaded from content/rpm-anim directory.Gender is advice for client, e.g.getLang()Bot language, e.g.getParameter(String key) Returns a parameter from parameter mapConfigured bot parameters parameters, available through getParameter() method, not publishedabstract reactor.core.publisher.Mono<String> getResponseAsync(Client c, String query) getUrl()Configured URL of chatbot server, not publishedinthashCode()voidobjectsAdded(List<VRObject> objects) New objects in the scene, typically a client that has arrived.voidobjectsRemoved(List<Map<String, String>> objects) Objects removed from the scene, typically a client that has left.voidprocessEvent(VREvent event) Process an event.voidGet response to something that a client "said", and write itabstract voidselfTest()Self test runs on server startup.voidScene management method, called when the scene changes.voidsetAnimations(List<String> animations) Available avatar animations, loaded from content/rpm-anim directory.voidGender is advice for client, e.g.voidBot language, e.g.voidsetParameterMap(Map<String, String> parameterMap) Configured bot parameters parameters, available through getParameter() method, not publishedvoidConfigured URL of chatbot server, not publishedtoString()voidUtility method - "say" something, notify all listeners.Methods inherited from class org.vrspace.server.obj.User
createScene, getLeftArmPos, getLeftArmRot, getOauth2provider, getRightArmPos, getRightArmRot, isHumanoid, isVideo, setHumanoid, setLeftArmPos, setLeftArmRot, setOauth2provider, setRightArmPos, setRightArmRot, setVideoMethods inherited from class org.vrspace.server.obj.Client
clearToken, getIdentity, getMapper, getName, getPicture, getPrivateMapper, getScene, getSceneProperties, getSession, getToken, getTokens, getUserHeight, getWriteBack, isGuest, setGuest, setIdentity, setMapper, setName, setPicture, setPrivateMapper, setScene, setSceneProperties, setSession, setToken, setTokens, setUserHeight, setWriteBackMethods inherited from class org.vrspace.server.obj.VRObject
active, addChildren, addListener, getActive, getAnimation, getChildren, getListeners, getMesh, getPermanent, getPosition, getProperties, getRotation, getScale, getScript, getTemporary, getWorld, getWorldId, isActive, isDeleted, isPermanent, isTemporary, notifyListeners, passive, removeListener, setActive, setAnimation, setChildren, setDeleted, setListeners, setMesh, setPermanent, setPosition, setProperties, setRotation, setScale, setScript, setTemporary, setWorld, setWorldIdMethods inherited from class org.vrspace.server.obj.Entity
dispose, getId, getObjectId, setId
-
Constructor Details
-
Bot
public Bot()
-
-
Method Details
-
getParameter
Returns a parameter from parameter map -
selfTest
Self test runs on server startup. Exceptions are logged but otherwise ignored.- Throws:
Exception
-
getResponseAsync
-
respondTo
Get response to something that a client "said", and write it -
write
Utility method - "say" something, notify all listeners. Null is silently ignored, as in no response from the bot. -
processEvent
Process an event. If that's something that a user wrote, calls respondTo method. Other events are ignored.- Overrides:
processEventin classClient- Parameters:
event- Whatever has changed
-
objectsAdded
New objects in the scene, typically a client that has arrived. This implementation does nothing, utility method for subclasses. -
objectsRemoved
Objects removed from the scene, typically a client that has left. This implementation does nothing, utility method for subclasses.- Parameters:
objects-
-
sendMessage
Scene management method, called when the scene changes.- Overrides:
sendMessagein classClient
-
toString
-
getGender
Gender is advice for client, e.g. voice synthesis -
getLang
Bot language, e.g. in case it can speak more than one -
getUrl
Configured URL of chatbot server, not published -
getParameterMap
Configured bot parameters parameters, available through getParameter() method, not published -
getAnimations
Available avatar animations, loaded from content/rpm-anim directory. Hint for the bot itself, not published. -
setGender
Gender is advice for client, e.g. voice synthesis -
setLang
Bot language, e.g. in case it can speak more than one -
setUrl
Configured URL of chatbot server, not published -
setParameterMap
Configured bot parameters parameters, available through getParameter() method, not published -
setAnimations
Available avatar animations, loaded from content/rpm-anim directory. Hint for the bot itself, not published. -
equals
-
canEqual
-
hashCode
public int hashCode()
-