org.hudsonci.plugins.jna
Class JnaNativeUnixSupport

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<org.eclipse.hudson.jna.NativeUnixSupport>
      extended by org.eclipse.hudson.jna.NativeUnixSupport
          extended by org.hudsonci.plugins.jna.JnaNativeUnixSupport
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<org.eclipse.hudson.jna.NativeUnixSupport>, Serializable

public class JnaNativeUnixSupport
extends org.eclipse.hudson.jna.NativeUnixSupport

JNA based Native Support Extension for Hudson

See Also:
Serialized Form

Nested Class Summary
static class JnaNativeUnixSupport.DescriptorImpl
           
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
JnaNativeUnixSupport()
           
 
Method Summary
 boolean canRestartJavaProcess()
           
 String checkPamAuthentication()
           
 boolean checkUnixGroup(String groupName)
           
 boolean checkUnixUser(String userName)
           
 boolean chmod(File file, int mask)
           
 boolean chown(File file, int uid, int gid)
           
 boolean createSymlink(String targetPath, File symlinkFile)
           
 boolean createSymlink(String targetPath, File symlinkFile, boolean usePosix)
           
 int getEgid()
           
 int getEuid()
           
 String getLastError()
           
 String getProcessUser()
           
 org.eclipse.hudson.jna.NativeSystemMemory getSystemMemory()
           
 boolean hasSupportFor(org.eclipse.hudson.jna.NativeFunction nativeFunc)
           
 boolean makeFileWritable(File file)
           
 int mode(File file)
           
 Set<String> pamAuthenticate(String serviceName, String userName, String password)
           
 String resolveSymlink(File linkFile)
           
 void restartJavaProcess(Map<String,String> properties, boolean daemonExec)
           
 
Methods inherited from class org.eclipse.hudson.jna.NativeUnixSupport
all, getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JnaNativeUnixSupport

@DataBoundConstructor
public JnaNativeUnixSupport()
Method Detail

hasSupportFor

public boolean hasSupportFor(org.eclipse.hudson.jna.NativeFunction nativeFunc)
Specified by:
hasSupportFor in class org.eclipse.hudson.jna.NativeUnixSupport

getLastError

public String getLastError()
Specified by:
getLastError in class org.eclipse.hudson.jna.NativeUnixSupport

chmod

public boolean chmod(File file,
                     int mask)
Specified by:
chmod in class org.eclipse.hudson.jna.NativeUnixSupport

chown

public boolean chown(File file,
                     int uid,
                     int gid)
Specified by:
chown in class org.eclipse.hudson.jna.NativeUnixSupport

mode

public int mode(File file)
Specified by:
mode in class org.eclipse.hudson.jna.NativeUnixSupport

makeFileWritable

public boolean makeFileWritable(File file)
Specified by:
makeFileWritable in class org.eclipse.hudson.jna.NativeUnixSupport

createSymlink

public boolean createSymlink(String targetPath,
                             File symlinkFile)
                      throws org.eclipse.hudson.jna.NativeAccessException
Specified by:
createSymlink in class org.eclipse.hudson.jna.NativeUnixSupport
Throws:
org.eclipse.hudson.jna.NativeAccessException

createSymlink

public boolean createSymlink(String targetPath,
                             File symlinkFile,
                             boolean usePosix)
                      throws org.eclipse.hudson.jna.NativeAccessException
Throws:
org.eclipse.hudson.jna.NativeAccessException

resolveSymlink

public String resolveSymlink(File linkFile)
                      throws org.eclipse.hudson.jna.NativeAccessException
Specified by:
resolveSymlink in class org.eclipse.hudson.jna.NativeUnixSupport
Throws:
org.eclipse.hudson.jna.NativeAccessException

getSystemMemory

public org.eclipse.hudson.jna.NativeSystemMemory getSystemMemory()
                                                          throws org.eclipse.hudson.jna.NativeAccessException
Specified by:
getSystemMemory in class org.eclipse.hudson.jna.NativeUnixSupport
Throws:
org.eclipse.hudson.jna.NativeAccessException

getEuid

public int getEuid()
            throws org.eclipse.hudson.jna.NativeAccessException
Specified by:
getEuid in class org.eclipse.hudson.jna.NativeUnixSupport
Throws:
org.eclipse.hudson.jna.NativeAccessException

getEgid

public int getEgid()
            throws org.eclipse.hudson.jna.NativeAccessException
Specified by:
getEgid in class org.eclipse.hudson.jna.NativeUnixSupport
Throws:
org.eclipse.hudson.jna.NativeAccessException

getProcessUser

public String getProcessUser()
                      throws org.eclipse.hudson.jna.NativeAccessException
Specified by:
getProcessUser in class org.eclipse.hudson.jna.NativeUnixSupport
Throws:
org.eclipse.hudson.jna.NativeAccessException

restartJavaProcess

public void restartJavaProcess(Map<String,String> properties,
                               boolean daemonExec)
                        throws org.eclipse.hudson.jna.NativeAccessException
Specified by:
restartJavaProcess in class org.eclipse.hudson.jna.NativeUnixSupport
Throws:
org.eclipse.hudson.jna.NativeAccessException

canRestartJavaProcess

public boolean canRestartJavaProcess()
                              throws org.eclipse.hudson.jna.NativeAccessException
Specified by:
canRestartJavaProcess in class org.eclipse.hudson.jna.NativeUnixSupport
Throws:
org.eclipse.hudson.jna.NativeAccessException

checkUnixUser

public boolean checkUnixUser(String userName)
                      throws org.eclipse.hudson.jna.NativeAccessException
Specified by:
checkUnixUser in class org.eclipse.hudson.jna.NativeUnixSupport
Throws:
org.eclipse.hudson.jna.NativeAccessException

checkUnixGroup

public boolean checkUnixGroup(String groupName)
                       throws org.eclipse.hudson.jna.NativeAccessException
Specified by:
checkUnixGroup in class org.eclipse.hudson.jna.NativeUnixSupport
Throws:
org.eclipse.hudson.jna.NativeAccessException

pamAuthenticate

public Set<String> pamAuthenticate(String serviceName,
                                   String userName,
                                   String password)
                            throws org.eclipse.hudson.jna.NativeAccessException
Specified by:
pamAuthenticate in class org.eclipse.hudson.jna.NativeUnixSupport
Throws:
org.eclipse.hudson.jna.NativeAccessException

checkPamAuthentication

public String checkPamAuthentication()
                              throws org.eclipse.hudson.jna.NativeAccessException
Specified by:
checkPamAuthentication in class org.eclipse.hudson.jna.NativeUnixSupport
Throws:
org.eclipse.hudson.jna.NativeAccessException


Copyright © 2004-2012 Hudson. All Rights Reserved.