Module

DRb

Inheritance

for ruby-1.8.0

Classes & Modules

Attributes

Name Visibility R/W Description
primary_server public RW The primary local dRuby server.

This is the server created by the start_service call.

Methods

Instance

Visibility Signature
public config ()
public current_server ()
public fetch_server (uri)
public front ()
public here? (uri)
public install_acl (acl)
public install_id_conv (idconv)
public mutex ()
public regist_server (server)
public remove_server (server)
public start_service (uri=nil, front=nil, config=nil)
public stop_service ()
public thread ()
public to_id (obj)
public to_obj (ref)
public uri ()

Instance Method Detail

config()

Get the configuration of the current server.

If there is no current server, this returns the default configuration. See current_server and DRbServer::make_config.

current_server()

Get the ‘current’ server.

In the context of execution taking place within the main thread of a dRuby server (typically, as a result of a remote call on the server or one of its objects), the current server is that server. Otherwise, the current server is the primary server.

If the above rule fails to find a server, a DRbServerNotFound error is raised.

fetch_server(uri)

front()

Get the front object of the current server.

This raises a DRbServerNotFound error if there is no current server. See current_server.

here?(uri)

Is uri the URI for the current local server?

install_acl(acl)

Set the default acl.

See DRb::DRbServer.default_acl.

install_id_conv(idconv)

Set the default id conv object.

See DRbServer#default_id_conv.

mutex()

regist_server(server)

remove_server(server)

start_service(uri=nil, front=nil, config=nil)

Start a dRuby server locally.

The new dRuby server will become the primary server, even if another server is currently the primary server.

uri is the URI for the server to bind to. If nil, the server will bind to random port on the default local host name and use the default dRuby protocol.

front is the server‘s front object. This may be nil.

config is the configuration for the new server. This may be nil.

See DRbServer::new.

stop_service()

Stop the local dRuby server.

This operates on the primary server. If there is no primary server currently running, it is a noop.

thread()

Get the thread of the primary server.

This returns nil if there is no primary server. See primary_server.

to_id(obj)

Get a reference id for an object using the current server.

This raises a DRbServerNotFound error if there is no current server. See current_server.

to_obj(ref)

Convert a reference into an object using the current server.

This raises a DRbServerNotFound error if there is no current server. See current_server.

uri()

Get the URI defining the local dRuby space.

This is the URI of the current server. See current_server.