i_securityqos.java
来自「java开源的企业总线.xmlBlaster」· Java 代码 · 共 71 行
JAVA
71 行
package org.xmlBlaster.authentication.plugins;import org.xmlBlaster.util.XmlBlasterException;/** * A client helper. * * The reason is for clients to access xmlBlaster * transparently from the authentication method * <p /> * Here is a typical example for a password based QoS * <pre> * <qos> * <securityService type='htpasswd' version='1.0'> * <![CDATA[ * <user>michele</user> * <passwd>secret</passwd> * ]]> * </securityService> * </qos> * </pre> */public interface I_SecurityQos { /** * Parse the given xml string which contains the userId and credentials. * Should be able to parse with or without surrounding <security> tag */ public void parse(String xml) throws XmlBlasterException; /** * Set the userId for the login. * <p/> * @param String userId */ public void setUserId(String userId); /** * Get the userId, which is used for the login; */ public String getUserId(); public void setClientIp (String ip); /** * Access the remote IP of the socket - the clients IP. * <p /> * Currently only passed by the SOCKET protocol plugin, other plugins return null * @return null if not known or something like "192.168.1.2" * */ public String getClientIp(); /** * Set the credential (password etc.). * <p/> * @param String credential */ public void setCredential(String cred); /** * Access the credential (e.g. password) */ public String getCredential(); /** * Serialize the information. */ public String toXml(String extraOffset);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?