| Class | MUES::ReactorProxy |
| In: |
lib/mues/reactorproxy.rb
(CVS)
|
| Parent: | MUES::Object |
Proxy class to allow limited access to an IO::Reactor object.
| SVNRev | = | %q$Rev: 1206 $ | SVN Revision | |
| SVNId | = | %q$Id: reactorproxy.rb 1206 2004-05-09 21:25:11Z deveiant $ | SVN Id | |
| SVNURL | = | %q$URL: svn+ssh://deveiate.org/usr/local/svn/MUES/trunk/lib/mues/reactorproxy.rb $ | SVN URL |
Instantiate and return a new ReactorProxy for the specified reactor (a Reactor object) and ioObject (an IO object).
# File lib/mues/reactorproxy.rb, line 52 def initialize( reactor, ioObject ) checkType( reactor, IO::Reactor ) checkType( ioObject, IO ) @reactor = reactor @ioObject = ioObject end
Remove the specified events from the proxied reactor object‘s current list of events to respond to for the IO associated with the proxy.
# File lib/mues/reactorproxy.rb, line 97 def disableEvents( *events ) return @reactor.disableEvents( @ioObject, *events ) end
Add the specified events to the proxied IO::Reactor object‘s current event list for the IO associated with the proxy.
# File lib/mues/reactorproxy.rb, line 89 def enableEvents( *events ) return @reactor.enableEvents( @ioObject, *events ) end
Register the specified callback (a Method or Proc object) or block for the specified eventMask (see the Reactor#register method for details)
# File lib/mues/reactorproxy.rb, line 68 def register( *args, &block ) return @reactor.register( @ioObject, *args, &block ) end
Returns true if the IO associated with the proxy is registered with the Reactor object.
# File lib/mues/reactorproxy.rb, line 81 def registered? return @reactor.handles.key?( @ioObject ) end