1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 20 package org.apache.guacamole.net.auth; 21 22 import java.util.Date; 23 24 /** 25 * A logging record describing when a user started and ended a particular 26 * activity. 27 */ 28 public interface ActivityRecord { 29 30 /** 31 * Returns the date and time the activity began. 32 * 33 * @return 34 * The date and time the activity began. 35 */ getStartDate()36 public Date getStartDate(); 37 38 /** 39 * Returns the date and time the activity ended, if applicable. 40 * 41 * @return 42 * The date and time the activity ended, or null if the activity is 43 * still ongoing or if the end time is unknown. 44 */ getEndDate()45 public Date getEndDate(); 46 47 /** 48 * Returns the hostname or IP address of the remote host that performed the 49 * activity associated with this record, if known. If the hostname or IP 50 * address is not known, null is returned. 51 * 52 * @return 53 * The hostname or IP address of the remote host, or null if this 54 * information is not available. 55 */ getRemoteHost()56 public String getRemoteHost(); 57 58 /** 59 * Returns the name of the user who performed or is performing the activity 60 * at the times given by this record. 61 * 62 * @return 63 * The name of the user who performed or is performing the associated 64 * activity. 65 */ getUsername()66 public String getUsername(); 67 68 /** 69 * Returns whether the activity associated with this record is still 70 * ongoing. 71 * 72 * @return 73 * true if the activity associated with this record is still ongoing, 74 * false otherwise. 75 */ isActive()76 public boolean isActive(); 77 78 } 79