Code example for Vector

Methods: add, size, toArray

0
 
		try { 
			RODAClient rodaClient = RodaClientFactory.getRodaWuiClient();
			String username = RodaClientFactory.getRodaClient(
					this.getThreadLocalRequest().getSession()).getUsername();
			List<LogEntryParameter> parameters = new Vector<LogEntryParameter>();
			parameters.add(new LogEntryParameter("hostname",
					getThreadLocalRequest().getRemoteHost())); 
			parameters.add(new LogEntryParameter("address",
					getThreadLocalRequest().getRemoteAddr())); 
			parameters.add(new LogEntryParameter("port",
					getThreadLocalRequest().getRemotePort() + "")); 
			parameters.add(new LogEntryParameter("classname", classname));
			parameters.add(new LogEntryParameter("error", message));
			if (error != null) {
				parameters.add(new LogEntryParameter("message", error
						.getMessage()));
			} 
 
			LogEntry logEntry = new LogEntry();
			logEntry.setAction(LOG_ACTION_WUI_ERROR);
			logEntry.setParameters(parameters
					.toArray(new LogEntryParameter[parameters.size()]));
			logEntry.setUsername(username);
 
			rodaClient.getLoggerService().addLogEntry(logEntry);
		} catch (RemoteException e) {
			logger.error("Error logging login", e);