Top Inners Fields Constructors Methods
jnr.netdb

pack-priv abstract Class NativeServicesDB

extends Object
implements ServicesDB
Class Inheritance
All Implemented Interfaces
jnr.netdb.ServicesDB
Known Direct Subclasses
jnr.netdb.NativeServicesDB.DefaultNativeServicesDB, jnr.netdb.NativeServicesDB.LinuxServicesDB
Imports
jnr.ffi.*, .Runtime, jnr.ffi.annotations.Direct, .Out, java.nio.ByteOrder, java.util.ArrayList, .Collection, .Collections, .HashMap, .List, .Map, java.util.logging.Level, .Logger

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
public static interface
public static interface
public static class
pack-priv static class
private static class
public static class

Field Summary

Modifier and TypeField and Description
protected final NativeServicesDB.LibServices

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static final NativeServicesDB
pack-priv static int
htons(int value)

pack-priv static final NativeServicesDB
load()

pack-priv static int
ntohs(int value)

pack-priv static Service
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

libback to summary
protected final NativeServicesDB.LibServices lib

Constructor Detail

NativeServicesDBback to summary
public NativeServicesDB(NativeServicesDB.LibServices lib)

Method Detail

getInstanceback to summary
public static final NativeServicesDB getInstance()
htonsback to summary
pack-priv static int htons(int value)
loadback to summary
pack-priv static final NativeServicesDB load()
ntohsback to summary
pack-priv static int ntohs(int value)
serviceFromNativeback to summary
pack-priv static Service serviceFromNative(NativeServicesDB.UnixServent s)
jnr.netdb back to summary

pack-priv final Class NativeServicesDB.DefaultNativeServicesDB

extends NativeServicesDB
Class Inheritance

Field Summary

Inherited from jnr.netdb.NativeServicesDB:
lib

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Collection<Service>
public Service
public Service
Inherited from jnr.netdb.NativeServicesDB:
getInstancehtonsloadntohsserviceFromNative

Constructor Detail

DefaultNativeServicesDBback to summary
pack-priv DefaultNativeServicesDB(NativeServicesDB.LibServices lib)

Method Detail

getAllServicesback to summary
public Collection<Service> getAllServices()

Implements jnr.netdb.ServicesDB.getAllServices.

getServiceByNameback to summary
public Service getServiceByName(String name, String proto)

Implements jnr.netdb.ServicesDB.getServiceByName.

getServiceByPortback to summary
public Service getServiceByPort(Integer port, String proto)

Implements jnr.netdb.ServicesDB.getServiceByPort.

jnr.netdb back to summary

public Interface NativeServicesDB.LibServices

Known Direct Subinterfaces
jnr.netdb.NativeServicesDB.LinuxLibServices

Method Summary

Modifier and TypeMethod and Description
public void
public NativeServicesDB.UnixServent
public NativeServicesDB.UnixServent
public NativeServicesDB.UnixServent

Method Detail

endserventback to summary
public void endservent()
getservbynameback to summary
public NativeServicesDB.UnixServent getservbyname(String name, String proto)
getservbyportback to summary
public NativeServicesDB.UnixServent getservbyport(Integer port, String proto)
getserventback to summary
public NativeServicesDB.UnixServent getservent()
jnr.netdb back to summary

public Interface NativeServicesDB.LinuxLibServices

extends LibServices

Method Summary

Modifier and TypeMethod and Description
public int
public int
public int
Inherited from jnr.netdb.NativeServicesDB.LibServices:
endserventgetservbynamegetservbyportgetservent

Method Detail

getservbyname_rback to summary
public int getservbyname_r(String name, String proto, NativeServicesDB.UnixServent servent, Pointer buf, NativeLong buflen, Pointer result)
getservbyport_rback to summary
public int getservbyport_r(Integer port, String proto, NativeServicesDB.UnixServent servent, Pointer buf, NativeLong buflen, Pointer result)
getservent_rback to summary
public int getservent_r(NativeServicesDB.UnixServent servent, Pointer buf, NativeLong buflen, Pointer result)
jnr.netdb back to summary

public Class NativeServicesDB.LinuxServent

extends UnixServent
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final Pointer
public static final int
Inherited from jnr.netdb.NativeServicesDB.UnixServent:
aliasesnameportproto

Constructor Summary

AccessConstructor and Description
public

Field Detail

bufback to summary
public final Pointer buf
BUFLENback to summary
public static final int BUFLEN

Constructor Detail

LinuxServentback to summary
public LinuxServent(Runtime runtime)
jnr.netdb back to summary

pack-priv final Class NativeServicesDB.LinuxServicesDB

extends NativeServicesDB
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Pointer
private static final int
private final NativeServicesDB.LinuxLibServices
private final Runtime

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public synchronized Collection<Service>
public synchronized Service
public synchronized Service
Inherited from jnr.netdb.NativeServicesDB:
getInstancehtonsloadntohsserviceFromNative

Field Detail

bufback to summary
private final Pointer buf
BUFLENback to summary
private static final int BUFLEN
libback to summary
private final NativeServicesDB.LinuxLibServices lib

Hides jnr.netdb.NativeServicesDB.lib.

runtimeback to summary
private final Runtime runtime

Constructor Detail

LinuxServicesDBback to summary
pack-priv LinuxServicesDB(NativeServicesDB.LibServices lib)

Method Detail

getAllServicesback to summary
public synchronized Collection<Service> getAllServices()

Implements jnr.netdb.ServicesDB.getAllServices.

getServiceByNameback to summary
public synchronized Service getServiceByName(String name, String proto)

Implements jnr.netdb.ServicesDB.getServiceByName.

getServiceByPortback to summary
public synchronized Service getServiceByPort(Integer port, String proto)

Implements jnr.netdb.ServicesDB.getServiceByPort.

jnr.netdb back to summary

private final Class NativeServicesDB.SingletonHolder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final NativeServicesDB

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final NativeServicesDB INSTANCE

Constructor Detail

SingletonHolderback to summary
private SingletonHolder()
jnr.netdb back to summary

public Class NativeServicesDB.UnixServent

extends Struct
Class Inheritance
Known Direct Subclasses
jnr.netdb.NativeServicesDB.LinuxServent

Field Summary

Modifier and TypeField and Description
public final Struct.Pointer
public final Struct.String
public final Struct.Signed32
public final Struct.String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from jnr.ffi.Struct:
alignmentarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayarrayBeginarrayEndarrayOffunctiongetMemorygetMemorygetRuntimeinnerinnerisDirectsizesizesizetoStringuseMemory

Field Detail

aliasesback to summary
public final Struct.Pointer aliases
nameback to summary
public final Struct.String name
portback to summary
public final Struct.Signed32 port
protoback to summary
public final Struct.String proto

Constructor Detail

UnixServentback to summary
public UnixServent(Runtime runtime)