Package i5.las2peer.security
Class BotAgent
java.lang.Object
i5.las2peer.security.AgentImpl
i5.las2peer.security.PassphraseAgentImpl
i5.las2peer.security.UserAgentImpl
i5.las2peer.security.BotAgent
- All Implemented Interfaces:
Agent
,PassphraseAgent
,UserAgent
,MessageReceiver
,XmlAble
,Cloneable
-
Field Summary
Fields inherited from class i5.las2peer.security.UserAgentImpl
sEmail, sLoginName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BotAgent
createBotAgent
(String passphrase) Create a new MonitoringAgent protected by the given passphrase.static BotAgent
createFromXml
(String xml) static BotAgent
createFromXml
(Element root) void
receiveMessage
(Message message, AgentContext context) This method is called by the node this agent is running at.Returns a XML representation of this object.Methods inherited from class i5.las2peer.security.UserAgentImpl
createUserAgent, getEmail, getLoginName, hasEmail, hasLoginName, notifyUnregister, setEmail, setLoginName
Methods inherited from class i5.las2peer.security.PassphraseAgentImpl
changePassphrase, getPassphrase, getSalt, lockPrivateKey, unlock, unlockPrivateKey
Methods inherited from class i5.las2peer.security.AgentImpl
cloneLocked, createFromXml, createFromXml, createSignature, decryptSymmetricKey, encryptPrivateKey, equals, getEncodedPrivate, getIdentifier, getPublicKey, getResponsibleForAgentSafeId, getRunningAtNode, isLocked, notifyRegistrationTo, signContent, unlockPrivateKey
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface i5.las2peer.api.security.Agent
getIdentifier, isLocked
Methods inherited from interface i5.las2peer.api.security.PassphraseAgent
unlock, unlockPrivateKey
Methods inherited from interface i5.las2peer.api.security.UserAgent
getEmail, getLoginName, hasEmail, hasLoginName, setEmail, setLoginName
-
Constructor Details
-
BotAgent
protected BotAgent(KeyPair pair, String passphrase, byte[] salt) throws AgentOperationFailedException, CryptoException -
BotAgent
-
-
Method Details
-
createBotAgent
public static BotAgent createBotAgent(String passphrase) throws CryptoException, AgentOperationFailedException Create a new MonitoringAgent protected by the given passphrase.- Parameters:
passphrase
- passphrase for the secret key of the new agent- Returns:
- a new UserAgent
- Throws:
CryptoException
AgentOperationFailedException
-
toXmlString
Description copied from interface:XmlAble
Returns a XML representation of this object.- Specified by:
toXmlString
in interfaceXmlAble
- Overrides:
toXmlString
in classUserAgentImpl
- Returns:
- a XML String representation
-
receiveMessage
This method is called by the node this agent is running at. In this context, it is used to receive monitoring messages send by theMonitoringObserver
s of the monitored nodes to the central processing service. Every other type of communication (to agents not resided at the monitoring node, other types of content thanMonitoringMessage
s will result in an Exception.- Specified by:
receiveMessage
in interfaceMessageReceiver
- Overrides:
receiveMessage
in classUserAgentImpl
- Parameters:
message
-context
-- Throws:
MessageException
-
createFromXml
- Throws:
MalformedXMLException
-
createFromXml
- Throws:
MalformedXMLException
-