java.lang.Object
de.thjom.java.systemd.AbstractAdapter
de.thjom.java.systemd.InterfaceAdapter
de.thjom.java.systemd.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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classstatic final classstatic enumNested classes/interfaces inherited from class de.thjom.java.systemd.InterfaceAdapter
InterfaceAdapter.AdapterProperty -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Managerprotected final Stringstatic final Stringstatic final Stringprivate final PropertiesFields inherited from class de.thjom.java.systemd.InterfaceAdapter
dbus, propertiesFields inherited from class de.thjom.java.systemd.AbstractAdapter
unitStateListeners -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends org.freedesktop.dbus.messages.DBusSignal>
voidaddHandler(Class<T> type, org.freedesktop.dbus.interfaces.DBusSigHandler<T> handler) voidprotected org.freedesktop.dbus.interfaces.DBusSigHandler<org.freedesktop.dbus.interfaces.Properties.PropertiesChanged> booleanstatic StringextractName(String objectPath) voidfreeze()longlonglonglonggetAfter()longlongbooleanlonglongintgetId()longlonglonglongbyte[]getJob()getNames()getRefs()longlonglonglongintfinal PropertiesReturns thePropertyInterfaceadapter of theUnitInterfaceof this interface adapter.getWants()inthashCode()booleanbooleanbooleanisAssignableFrom(String objectPath) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidvoidstatic StringnormalizeName(String name, String suffix) voidref()org.freedesktop.dbus.DBusPathorg.freedesktop.dbus.DBusPathorg.freedesktop.dbus.DBusPathreloadOrRestart(Unit.Mode mode) org.freedesktop.dbus.DBusPathreloadOrRestart(String mode) org.freedesktop.dbus.DBusPathreloadOrTryRestart(Unit.Mode mode) org.freedesktop.dbus.DBusPathreloadOrTryRestart(String mode) <T extends org.freedesktop.dbus.messages.DBusSignal>
voidremoveHandler(Class<T> type, org.freedesktop.dbus.interfaces.DBusSigHandler<T> handler) voidorg.freedesktop.dbus.DBusPathorg.freedesktop.dbus.DBusPathvoidsetProperties(boolean runtime, Map<String, Object> properties) org.freedesktop.dbus.DBusPathorg.freedesktop.dbus.DBusPathorg.freedesktop.dbus.DBusPathorg.freedesktop.dbus.DBusPathvoidthaw()toString()org.freedesktop.dbus.DBusPathtryRestart(Unit.Mode mode) org.freedesktop.dbus.DBusPathtryRestart(String mode) voidunref()Methods inherited from class de.thjom.java.systemd.InterfaceAdapter
getObjectPath, getProperties, isRemoteMethods inherited from class de.thjom.java.systemd.AbstractAdapter
addListener, removeListenerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface de.thjom.java.systemd.UnitStateNotifier
addListener, removeListener
-
Field Details
-
SERVICE_NAME
- See Also:
-
OBJECT_PATH
- See Also:
-
name
-
manager
-
unitProperties
-
-
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
-
extractName
-
equals
- Overrides:
equalsin classInterfaceAdapter
-
hashCode
public int hashCode()- Overrides:
hashCodein classInterfaceAdapter
-
getInterface
- Overrides:
getInterfacein classInterfaceAdapter
-
getUnitProperties
Returns thePropertyInterfaceadapter of theUnitInterfaceof this interface adapter.- Returns:
- The property interface adapter.
-
isAssignableFrom
-
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:
addHandlerin classInterfaceAdapter- 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:
removeHandlerin classInterfaceAdapter- Throws:
org.freedesktop.dbus.exceptions.DBusException
-
createStateHandler
protected org.freedesktop.dbus.interfaces.DBusSigHandler<org.freedesktop.dbus.interfaces.Properties.PropertiesChanged> createStateHandler()- Overrides:
createStateHandlerin classAbstractAdapter
-
introspect
- Throws:
org.freedesktop.dbus.exceptions.DBusException
-
clean
-
freeze
public void freeze() -
kill
-
kill
-
ref
public void ref() -
reload
-
reload
-
reloadOrRestart
-
reloadOrRestart
-
reloadOrTryRestart
-
reloadOrTryRestart
-
resetFailed
public void resetFailed() -
restart
-
restart
-
start
-
start
-
stop
-
stop
-
thaw
public void thaw() -
tryRestart
-
tryRestart
-
unref
public void unref() -
setProperties
-
getActiveEnterTimestamp
public long getActiveEnterTimestamp() -
getActiveEnterTimestampMonotonic
public long getActiveEnterTimestampMonotonic() -
getActiveExitTimestamp
public long getActiveExitTimestamp() -
getActiveExitTimestampMonotonic
public long getActiveExitTimestampMonotonic() -
getActiveState
-
getAfter
-
isAllowIsolate
public boolean isAllowIsolate() -
isAssertResult
public boolean isAssertResult() -
getAssertTimestamp
public long getAssertTimestamp() -
getAssertTimestampMonotonic
public long getAssertTimestampMonotonic() -
getAsserts
-
getBefore
-
getBindsTo
-
getBoundBy
-
isCanClean
-
isCanFreeze
public boolean isCanFreeze() -
isCanIsolate
public boolean isCanIsolate() -
isCanReload
public boolean isCanReload() -
isCanStart
public boolean isCanStart() -
isCanStop
public boolean isCanStop() -
getCollectMode
-
getConditionResult
public boolean getConditionResult() -
getConditionTimestamp
public long getConditionTimestamp() -
getConditionTimestampMonotonic
public long getConditionTimestampMonotonic() -
getConditions
-
getConflictedBy
-
getConflicts
-
getConsistsOf
-
isDefaultDependencies
public boolean isDefaultDependencies() -
getDescription
-
getDocumentation
-
getDropInPaths
-
getFailureAction
-
getFailureActionExitStatus
public int getFailureActionExitStatus() -
getFollowing
-
getFragmentPath
-
getFreezerState
-
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
-
getJobRunningTimeoutUSec
-
getJobTimeoutAction
-
getJobTimeoutRebootArgument
-
getJobTimeoutUSec
-
getJoinsNamespaceOf
-
getLoadError
-
getLoadState
-
getNames
-
isNeedDaemonReload
public boolean isNeedDaemonReload() -
getOnFailure
-
getOnFailureJobMode
-
getPartOf
-
isPerpetual
public boolean isPerpetual() -
getPropagatesReloadTo
-
getRebootArgument
-
getRefs
-
isRefuseManualStart
public boolean isRefuseManualStart() -
isRefuseManualStop
public boolean isRefuseManualStop() -
getReloadPropagatedFrom
-
getUpholds
-
getUpheldBy
-
getRequiredBy
-
getRequires
-
getRequiresMountsFor
-
getRequisite
-
getRequisiteOf
-
getSourcePath
-
getStartLimitAction
-
getStartLimitBurst
public long getStartLimitBurst() -
getStartLimitIntervalUSec
public long getStartLimitIntervalUSec() -
getStateChangeTimestamp
public long getStateChangeTimestamp() -
getStateChangeTimestampMonotonic
public long getStateChangeTimestampMonotonic() -
isStopWhenUnneeded
public boolean isStopWhenUnneeded() -
getSubState
-
getSuccessAction
-
getSuccessActionExitStatus
public int getSuccessActionExitStatus() -
isTransient
public boolean isTransient() -
getTriggeredBy
-
getTriggers
-
getUnitFilePreset
-
getUnitFileState
-
getWantedBy
-
getWants
-
toString
-