org.jboss.weld.context.beanstore.ConversationNamingScheme Maven / Gradle / Ivy
package org.jboss.weld.context.beanstore;
import org.jboss.weld.serialization.BeanIdentifierIndex;
/**
*
* A naming scheme which can have it's cid swapped out.
*
*
*
* This naming scheme is not thread safe
*
*
* @author pmuir
*/
public class ConversationNamingScheme extends BeanIdentifierIndexNamingScheme {
public static final String PARAMETER_NAME = ConversationNamingScheme.class.getName();
private String cid;
private final String prefixBase;
public ConversationNamingScheme(String prefixBase, String cid, BeanIdentifierIndex index) {
super("#", index);
this.cid = cid;
this.prefixBase = prefixBase;
}
public void setCid(String cid) {
this.cid = cid;
}
@Override
protected String getPrefix() {
return prefixBase + "." + cid;
}
}