Class Unit

All Implemented Interfaces:
UnitStateNotifier, org.freedesktop.dbus.interfaces.DBusInterface
Direct Known Subclasses:
Automount, BusName, Device, Mount, Path, Scope, Service, Slice, Socket, Swap, Target, Timer

public abstract class Unit extends InterfaceAdapter implements UnitStateNotifier
  • Field Details

  • Constructor Details

    • Unit

      protected Unit(Manager manager, UnitInterface iface, String name) throws org.freedesktop.dbus.exceptions.DBusException
      Throws:
      org.freedesktop.dbus.exceptions.DBusException
  • Method Details

    • normalizeName

      public static String normalizeName(String name, String suffix)
    • extractName

      public static String extractName(String objectPath)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class InterfaceAdapter
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class InterfaceAdapter
    • getInterface

      public UnitInterface getInterface()
      Overrides:
      getInterface in class InterfaceAdapter
    • getUnitProperties

      public final Properties getUnitProperties()
      Returns the PropertyInterface adapter of the UnitInterface of this interface adapter.

      Returns:
      The property interface adapter.
    • isAssignableFrom

      public boolean isAssignableFrom(String objectPath)
    • addHandler

      public <T extends org.freedesktop.dbus.messages.DBusSignal> void addHandler(Class<T> type, org.freedesktop.dbus.interfaces.DBusSigHandler<T> handler) throws org.freedesktop.dbus.exceptions.DBusException
      Overrides:
      addHandler in class InterfaceAdapter
      Throws:
      org.freedesktop.dbus.exceptions.DBusException
    • removeHandler

      public <T extends org.freedesktop.dbus.messages.DBusSignal> void removeHandler(Class<T> type, org.freedesktop.dbus.interfaces.DBusSigHandler<T> handler) throws org.freedesktop.dbus.exceptions.DBusException
      Overrides:
      removeHandler in class InterfaceAdapter
      Throws:
      org.freedesktop.dbus.exceptions.DBusException
    • createStateHandler

      protected org.freedesktop.dbus.interfaces.DBusSigHandler<org.freedesktop.dbus.interfaces.Properties.PropertiesChanged> createStateHandler()
      Overrides:
      createStateHandler in class AbstractAdapter
    • introspect

      public String introspect() throws org.freedesktop.dbus.exceptions.DBusException
      Throws:
      org.freedesktop.dbus.exceptions.DBusException
    • clean

      public void clean(List<String> mask)
    • freeze

      public void freeze()
    • kill

      public void kill(Unit.Who who, int signal)
    • kill

      public void kill(String who, int signal)
    • ref

      public void ref()
    • reload

      public org.freedesktop.dbus.DBusPath reload(Unit.Mode mode)
    • reload

      public org.freedesktop.dbus.DBusPath reload(String mode)
    • reloadOrRestart

      public org.freedesktop.dbus.DBusPath reloadOrRestart(Unit.Mode mode)
    • reloadOrRestart

      public org.freedesktop.dbus.DBusPath reloadOrRestart(String mode)
    • reloadOrTryRestart

      public org.freedesktop.dbus.DBusPath reloadOrTryRestart(Unit.Mode mode)
    • reloadOrTryRestart

      public org.freedesktop.dbus.DBusPath reloadOrTryRestart(String mode)
    • resetFailed

      public void resetFailed()
    • restart

      public org.freedesktop.dbus.DBusPath restart(Unit.Mode mode)
    • restart

      public org.freedesktop.dbus.DBusPath restart(String mode)
    • start

      public org.freedesktop.dbus.DBusPath start(Unit.Mode mode)
    • start

      public org.freedesktop.dbus.DBusPath start(String mode)
    • stop

      public org.freedesktop.dbus.DBusPath stop(Unit.Mode mode)
    • stop

      public org.freedesktop.dbus.DBusPath stop(String mode)
    • thaw

      public void thaw()
    • tryRestart

      public org.freedesktop.dbus.DBusPath tryRestart(Unit.Mode mode)
    • tryRestart

      public org.freedesktop.dbus.DBusPath tryRestart(String mode)
    • unref

      public void unref()
    • setProperties

      public void setProperties(boolean runtime, Map<String,Object> properties)
    • getActiveEnterTimestamp

      public long getActiveEnterTimestamp()
    • getActiveEnterTimestampMonotonic

      public long getActiveEnterTimestampMonotonic()
    • getActiveExitTimestamp

      public long getActiveExitTimestamp()
    • getActiveExitTimestampMonotonic

      public long getActiveExitTimestampMonotonic()
    • getActiveState

      public String getActiveState()
    • getAfter

      public List<String> getAfter()
    • isAllowIsolate

      public boolean isAllowIsolate()
    • isAssertResult

      public boolean isAssertResult()
    • getAssertTimestamp

      public long getAssertTimestamp()
    • getAssertTimestampMonotonic

      public long getAssertTimestampMonotonic()
    • getAsserts

      public List<Condition> getAsserts()
    • getBefore

      public List<String> getBefore()
    • getBindsTo

      public List<String> getBindsTo()
    • getBoundBy

      public List<String> getBoundBy()
    • isCanClean

      public List<String> isCanClean()
    • isCanFreeze

      public boolean isCanFreeze()
    • isCanIsolate

      public boolean isCanIsolate()
    • isCanReload

      public boolean isCanReload()
    • isCanStart

      public boolean isCanStart()
    • isCanStop

      public boolean isCanStop()
    • getCollectMode

      public String getCollectMode()
    • getConditionResult

      public boolean getConditionResult()
    • getConditionTimestamp

      public long getConditionTimestamp()
    • getConditionTimestampMonotonic

      public long getConditionTimestampMonotonic()
    • getConditions

      public List<Condition> getConditions()
    • getConflictedBy

      public List<String> getConflictedBy()
    • getConflicts

      public List<String> getConflicts()
    • getConsistsOf

      public List<String> getConsistsOf()
    • isDefaultDependencies

      public boolean isDefaultDependencies()
    • getDescription

      public String getDescription()
    • getDocumentation

      public List<String> getDocumentation()
    • getDropInPaths

      public List<String> getDropInPaths()
    • getFailureAction

      public String getFailureAction()
    • getFailureActionExitStatus

      public int getFailureActionExitStatus()
    • getFollowing

      public String getFollowing()
    • getFragmentPath

      public String getFragmentPath()
    • getFreezerState

      public String getFreezerState()
    • getId

      public String getId()
    • isIgnoreOnIsolate

      public boolean isIgnoreOnIsolate()
    • getInactiveEnterTimestamp

      public long getInactiveEnterTimestamp()
    • getInactiveEnterTimestampMonotonic

      public long getInactiveEnterTimestampMonotonic()
    • getInactiveExitTimestamp

      public long getInactiveExitTimestamp()
    • getInactiveExitTimestampMonotonic

      public long getInactiveExitTimestampMonotonic()
    • getInvocationID

      public byte[] getInvocationID()
    • getJob

      public Job getJob()
    • getJobRunningTimeoutUSec

      public BigInteger getJobRunningTimeoutUSec()
    • getJobTimeoutAction

      public String getJobTimeoutAction()
    • getJobTimeoutRebootArgument

      public String getJobTimeoutRebootArgument()
    • getJobTimeoutUSec

      public BigInteger getJobTimeoutUSec()
    • getJoinsNamespaceOf

      public List<String> getJoinsNamespaceOf()
    • getLoadError

      public LoadError getLoadError()
    • getLoadState

      public String getLoadState()
    • getNames

      public List<String> getNames()
    • isNeedDaemonReload

      public boolean isNeedDaemonReload()
    • getOnFailure

      public List<String> getOnFailure()
    • getOnFailureJobMode

      public String getOnFailureJobMode()
    • getPartOf

      public List<String> getPartOf()
    • isPerpetual

      public boolean isPerpetual()
    • getPropagatesReloadTo

      public List<String> getPropagatesReloadTo()
    • getRebootArgument

      public String getRebootArgument()
    • getRefs

      public List<String> getRefs()
    • isRefuseManualStart

      public boolean isRefuseManualStart()
    • isRefuseManualStop

      public boolean isRefuseManualStop()
    • getReloadPropagatedFrom

      public List<String> getReloadPropagatedFrom()
    • getUpholds

      public List<String> getUpholds()
    • getUpheldBy

      public List<String> getUpheldBy()
    • getRequiredBy

      public List<String> getRequiredBy()
    • getRequires

      public List<String> getRequires()
    • getRequiresMountsFor

      public List<String> getRequiresMountsFor()
    • getRequisite

      public List<String> getRequisite()
    • getRequisiteOf

      public List<String> getRequisiteOf()
    • getSourcePath

      public String getSourcePath()
    • getStartLimitAction

      public String getStartLimitAction()
    • getStartLimitBurst

      public long getStartLimitBurst()
    • getStartLimitIntervalUSec

      public long getStartLimitIntervalUSec()
    • getStateChangeTimestamp

      public long getStateChangeTimestamp()
    • getStateChangeTimestampMonotonic

      public long getStateChangeTimestampMonotonic()
    • isStopWhenUnneeded

      public boolean isStopWhenUnneeded()
    • getSubState

      public String getSubState()
    • getSuccessAction

      public String getSuccessAction()
    • getSuccessActionExitStatus

      public int getSuccessActionExitStatus()
    • isTransient

      public boolean isTransient()
    • getTriggeredBy

      public List<String> getTriggeredBy()
    • getTriggers

      public List<String> getTriggers()
    • getUnitFilePreset

      public String getUnitFilePreset()
    • getUnitFileState

      public String getUnitFileState()
    • getWantedBy

      public List<String> getWantedBy()
    • getWants

      public List<String> getWants()
    • toString

      public String toString()
      Overrides:
      toString in class Object