Top Fields Constructors Methods
org.jruby.ext.socket

public Class Option

extends RubyObject
Class Inheritance
Imports
jnr.constants.platform.Errno, .ProtocolFamily, .Sock, .SocketLevel, .SocketOption, org.jruby.Ruby, .RubyClass, .RubyInteger, .RubyObject, org.jruby.anno.JRubyMethod, org.jruby.runtime.ThreadContext, .Visibility, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.ByteList, .Pack, .Sprintf, java.nio.ByteBuffer, java.util.Locale

Field Summary

Modifier and TypeField and Description
private ByteList
private ProtocolFamily
private SocketLevel
private SocketOption
Inherited from org.jruby.RubyObject:
IVAR_INSPECTING_OBJECT_ALLOCATOROBJECT_ALLOCATORREIFYING_OBJECT_ALLOCATOR

Constructor Summary

AccessConstructor and Description
public
Option(Ruby runtime, RubyClass klass)

public
Option(Ruby runtime, ProtocolFamily family, SocketLevel level, SocketOption option, ByteList data)

public
Option(Ruby runtime, RubyClass klass, ProtocolFamily family, SocketLevel level, SocketOption option, ByteList data)

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
public static IRubyObject
bool(ThreadContext context, IRubyObject self, IRubyObject[] args)

public IRubyObject
public static void
createOption(ThreadContext context, RubyClass Object, RubyClass Socket)

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
inspect(ThreadContext context)

Overrides org.jruby.RubyBasicObject.inspect.

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Returns a string containing a human-readable representation of obj.

public IRubyObject
public static IRubyObject
linger(ThreadContext context, IRubyObject self, IRubyObject vonoffArg, IRubyObject vsecs)

public IRubyObject
private String
private String
private String
public IRubyObject
public static ByteList
packInt(int i)

public static ByteList
packLinger(int vonoff, int vsecs)

public static IRubyObject
public IRubyObject
public IRubyObject
public static int
public static int[]
private static void
validateDataSize(ThreadContext context, ByteList data, int size)

Inherited from org.jruby.RubyObject:
attachToObjectSpacecallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitconvertToTypedigdig1dig2eqlInternalequalInternalequalsfinishObjectClassgetNativeClassIndexhashCodeinspectop_eqqputsspecificEvaltoRubyStringtoString

Field Detail

databack to summary
private ByteList data
familyback to summary
private ProtocolFamily family
levelback to summary
private SocketLevel level
optionback to summary
private SocketOption option

Constructor Detail

Optionback to summary
public Option(Ruby runtime, RubyClass klass)
Optionback to summary
public Option(Ruby runtime, ProtocolFamily family, SocketLevel level, SocketOption option, ByteList data)
Optionback to summary
public Option(Ruby runtime, RubyClass klass, ProtocolFamily family, SocketLevel level, SocketOption option, ByteList data)

Method Detail

asIntback to summary
public IRubyObject asInt(ThreadContext context)
Annotations
@JRubyMethod
name:int
boolback to summary
public static IRubyObject bool(ThreadContext context, IRubyObject self, IRubyObject[] args)
Annotations
@JRubyMethod
required:4
meta:true
boolback to summary
public IRubyObject bool(ThreadContext context)
Annotations
@JRubyMethod
createOptionback to summary
public static void createOption(ThreadContext context, RubyClass Object, RubyClass Socket)
databack to summary
public IRubyObject data(ThreadContext context)
Annotations
@JRubyMethod
familyback to summary
public IRubyObject family(ThreadContext context)
Annotations
@JRubyMethod
initializeback to summary
public IRubyObject initialize(ThreadContext context, IRubyObject[] args)
Annotations
@JRubyMethod
required:4
visibility:PRIVATE
inspectback to summary
public IRubyObject inspect(ThreadContext context)

Overrides org.jruby.RubyBasicObject.inspect.

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Doc from org.jruby.RubyBasicObject.inspect.

Returns a string containing a human-readable representation of obj. If not overridden, uses the to_s method to generate the string. [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" Time.new.inspect #=> "Wed Apr 09 08:54:39 CDT 2003"

Annotations
@JRubyMethod
levelback to summary
public IRubyObject level(ThreadContext context)
Annotations
@JRubyMethod
lingerback to summary
public static IRubyObject linger(ThreadContext context, IRubyObject self, IRubyObject vonoffArg, IRubyObject vsecs)
Annotations
@JRubyMethod
meta:true
lingerback to summary
public IRubyObject linger(ThreadContext context)
Annotations
@JRubyMethod
noPrefixback to summary
private String noPrefix(ProtocolFamily family)
noPrefixback to summary
private String noPrefix(SocketOption option)
optionValueback to summary
private String optionValue()
optnameback to summary
public IRubyObject optname(ThreadContext context)
Annotations
@JRubyMethod
packIntback to summary
public static ByteList packInt(int i)
packLingerback to summary
public static ByteList packLinger(int vonoff, int vsecs)
rb_intback to summary
public static IRubyObject rb_int(ThreadContext context, IRubyObject self, IRubyObject[] args)
Annotations
@JRubyMethod
name:int
required:4
meta:true
to_sback to summary
public IRubyObject to_s(ThreadContext context)

Overrides org.jruby.RubyBasicObject.to_s.

Annotations
@JRubyMethod
unpackback to summary
public IRubyObject unpack(ThreadContext context, IRubyObject arg0)
Annotations
@JRubyMethod
unpackIntback to summary
public static int unpackInt(ByteList data)
unpackLingerback to summary
public static int[] unpackLinger(ByteList data)
validateDataSizeback to summary
private static void validateDataSize(ThreadContext context, ByteList data, int size)