network.events
Class UserSwitchAttemptEvent

java.lang.Object
  extended bynetwork.events.Event
      extended bynetwork.events.UserSwitchAttemptEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
UserSwitchConfirmEvent

public class UserSwitchAttemptEvent
extends Event

Indicates that a user is trying to log on as another user. This could be accomplished using SU, ssh, etc

See Also:
Serialized Form

Field Summary
 
Fields inherited from class network.events.Event
agentURN, domainName, eventDeliverTryNumber, priority
 
Constructor Summary
UserSwitchAttemptEvent(java.lang.String eventName, long eventGenerationTime, ajanta.naming.URN agentURN, java.lang.String user1, java.lang.String user2, java.lang.String source, java.lang.String target, java.lang.String type, int alertLevel, int alarmLevel)
          Initializes all fields to the given values
 
Method Summary
 java.lang.String getColumnNames()
          Returns a list of column names and SQL data types.
 java.lang.String getFieldNames()
          Returns a list of SQL table field names for this event
 java.lang.String getFieldValues()
          Returns a list of SQL values.
 java.lang.String getInitiatingUser()
           
 java.lang.String getLoginType()
          Returns the method being used to make the switch attempt
 java.lang.String getSourceHost()
          Returns the name of the computer from which the switch attempt is being made
 java.lang.String getSwitchedUser()
          Returns the user that is being switched to
 java.lang.String getTargetHost()
          Returns the name of the computer to which the switch event is being sent
 java.lang.String toString()
          Returns a string representation of this object
 
Methods inherited from class network.events.Event
createSQL, getAgentURN, getAlarmLevel, getAlertLevel, getDomainName, getEventDeliverTryNumber, getEventGenerationTime, getEventID, getEventLocation, getID, getINTMonth, getMyClass, getName, getSQLTime, getSQLTime, setAlarmLevel, setAlertLevel, setDomainName, setEventID, setPriority, toSQL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserSwitchAttemptEvent

public UserSwitchAttemptEvent(java.lang.String eventName,
                              long eventGenerationTime,
                              ajanta.naming.URN agentURN,
                              java.lang.String user1,
                              java.lang.String user2,
                              java.lang.String source,
                              java.lang.String target,
                              java.lang.String type,
                              int alertLevel,
                              int alarmLevel)
Initializes all fields to the given values

Parameters:
eventName - The name of this event
eventGenerationTime - The time at which this event was generated
agentURN - The URN of the agent that created this event
user1 - The user making the switch attempt
user2 - The user being switched to
source - The computer from which the switch attempt is being made
target - The computer that is being switched to
type - The method being used to make the user switch
alertLevel - The alert level for this event
alarmLevel - The alarm level for this event
Method Detail

toString

public java.lang.String toString()
Returns a string representation of this object

Overrides:
toString in class Event
Returns:
A string representation of this object

getColumnNames

public java.lang.String getColumnNames()
Returns a list of column names and SQL data types. For use in SQL statements

Overrides:
getColumnNames in class Event
Returns:
A comma separated list of column names and SQL data types

getFieldNames

public java.lang.String getFieldNames()
Returns a list of SQL table field names for this event

Overrides:
getFieldNames in class Event
Returns:
A comma seperated list of SQL field names

getFieldValues

public java.lang.String getFieldValues()
Returns a list of SQL values. The ordering of values matches the ordering of field names and column names from the getFieldNames and getColumnNames methods

Overrides:
getFieldValues in class Event
Returns:
A comma separated list of values

getInitiatingUser

public java.lang.String getInitiatingUser()

getSwitchedUser

public java.lang.String getSwitchedUser()
Returns the user that is being switched to

Returns:
A string containing the name of the user that is being switched to

getSourceHost

public java.lang.String getSourceHost()
Returns the name of the computer from which the switch attempt is being made

Returns:
A string containing the hostname of the computer from which the switch attempt is being made

getTargetHost

public java.lang.String getTargetHost()
Returns the name of the computer to which the switch event is being sent

Returns:
A string containing the name of the target computer

getLoginType

public java.lang.String getLoginType()
Returns the method being used to make the switch attempt

Returns:
A string containing the method being used to make the switch attempt