[duplicado - respondido] duvida JSP - session

0 respostas
I

Pessoal, alguem pode me explicar o código abaixo.

Estou pesquisando no código algo como session.setAttribute("sessionDT"), pois estou tentando entender aonde foi setado essa session, mais não acho nada .... obrigatoriamente em algum lugar do código tem quer ter o "session.setAttribute("sessionDT")" ... é isso??

na JSP:
boolean crivoPF = ((DexTotalServerControler)session.getAttribute("sessionDT")).getSession().getOperatorCompany().isCrivoPF();

classe DexTotalServerControler:

public class DexTotalServerControler {

    private IDexTotalServer server;
    private String sessionID = "";

    public DexTotalServerControler(IDexTotalServer server) {
        this.server = server;
    }

    public void login(String operatorCompanyName, String userName, String password, int userType) throws InvalidLoginException, DatabaseException, RemoteException, DextotalException {
        sessionID = server.login(operatorCompanyName, userName, password, userType);
    }

    public void logout() throws RemoteException {
        server.logout(sessionID);
    }

    public void shutdown() throws AccessDeniedException, RemoteException {
        server.shutdown();
    }

    public Session getSession() throws InvalidLoginException, RemoteException{
        return server.getSession(sessionID);
    }

    public Remote getServiceToTrace(String serviceName) throws ServiceNotFoundException, ServiceNotInitializedException, InvalidLoginException, RemoteException{
        return server.getService(sessionID, serviceName, false);
    }
    
    public Remote getService(String serviceName) throws ServiceNotFoundException, ServiceNotInitializedException, InvalidLoginException, RemoteException{
        return server.getService(sessionID, serviceName, true);
    }

    public Remote getService(Class serviceInterface) throws ServiceNotFoundException, ServiceNotInitializedException, InvalidLoginException, RemoteException{
        return server.getService(sessionID, serviceInterface);
    }

    public String getSessionID() {
        return this.sessionID;
    }

    public String getServerVersion() throws RemoteException {
        return server.getServerVersion();
    }

    public com.dexbrasil.dextotal.util.Date getDate() throws RemoteException, DextotalException {
        return server.getDate();
    }
    
    public String getDexTotalHomePath() throws RemoteException, DextotalException {
        return server.getDexTotalHomePath();
    }
    
    public Collection listAllConnections() throws RemoteException, DextotalException, InvalidSessionException, AccessDeniedException {
        return server.listAllConnections(this.sessionID);
    }
    
	public MonitorServerInfo getServerInfo() throws RemoteException
	{
		return server.getServerInfo();
	}

    public Collection<CacheEntry> getCaches() throws RemoteException {
        return server.getCaches();
    }

    
}
Criado 11 de maio de 2012
Respostas 0
Participantes 1