FileDocCategorySizeDatePackage
SingleSignOnMessage.javaAPI DocApache Tomcat 6.0.144940Fri Jul 20 04:20:32 BST 2007org.apache.catalina.ha.authenticator

SingleSignOnMessage

public class SingleSignOnMessage extends Object implements Serializable, org.apache.catalina.ha.ClusterMessage
Contains the SingleSignOn data, read and written by the ClusterSingleSignOn
author
Fabien Carrion

Fields Summary
public static final int
ADD_SESSION
public static final int
DEREGISTER_SESSION
public static final int
LOGOUT_SESSION
public static final int
REGISTER_SESSION
public static final int
UPDATE_SESSION
public static final int
REMOVE_SESSION
private int
action
private String
ssoId
private String
ctxname
private String
sessionId
private String
authType
private String
password
private String
username
private org.apache.catalina.tribes.Member
address
private long
timestamp
private String
uniqueId
Constructors Summary
public SingleSignOnMessage(org.apache.catalina.tribes.Member source, String ssoId, String sessionId)


      
			        
			         
        this.address = source;
	this.ssoId = ssoId;
	this.sessionId = sessionId;
    
Methods Summary
public intgetAction()

	return action;
    
public org.apache.catalina.tribes.MembergetAddress()
Get the address that this message originated from. This would be set if the message was being relayed from a host other than the one that originally sent it.

	return address;
    
public java.lang.StringgetAuthType()

	return authType;
    
public java.lang.StringgetContextName()

	return ctxname;
    
public java.lang.StringgetPassword()

	return password;
    
public java.lang.StringgetSessionId()

	return sessionId;
    
public java.lang.StringgetSsoId()

	return ssoId;
    
public longgetTimestamp()
Timestamp message.

return
long

        return timestamp;
    
public java.lang.StringgetUniqueId()
Each message must have a unique ID, in case of using async replication, and a smart queue, this id is used to replace messages not yet sent.

return
String

	if (this.uniqueId != null)
	    return this.uniqueId;
	StringBuffer result = new StringBuffer(getSsoId());
	result.append("#-#");
	result.append(System.currentTimeMillis());
	return result.toString();
    
public java.lang.StringgetUsername()

	return username;
    
public voidsetAction(int action)

	this.action = action;
    
public voidsetAddress(org.apache.catalina.tribes.Member member)
Called by the cluster before sending it to the other nodes.

param
member Member

	this.address = member;
    
public voidsetAuthType(java.lang.String authType)

	this.authType = authType;
    
public voidsetContextName(java.lang.String ctxname)

	this.ctxname = ctxname;
    
public voidsetPassword(java.lang.String password)

	this.password = password;
    
public voidsetSessionId(java.lang.String sessionId)

	this.sessionId = sessionId;
    
public voidsetSsoId(java.lang.String ssoId)

	this.ssoId = ssoId;
    
public voidsetTimestamp(long timestamp)
Called by the cluster before sending out the message.

param
timestamp The timestamp

        this.timestamp = timestamp;
    
public voidsetUniqueId(java.lang.String uniqueId)

        this.uniqueId = uniqueId;
    
public voidsetUsername(java.lang.String username)

	this.username = username;
    
public java.lang.StringtoString()
Return a String rendering of this object.


        StringBuffer sb = new StringBuffer("SingleSignOnMessage[action=");
	sb.append(getAction()).append(", ssoId=").append(getSsoId());
	sb.append(", sessionId=").append(getSessionId()).append(", username=");
	sb.append(getUsername()).append("]");
        return (sb.toString());