public void init ( NodeRecord record ) { _record = record ; _client = new Client ( null , _omgr ) { @ Override protected void convertFromRemote ( DObject target , DEvent event ) { super . convertFromRemote ( target , event ) ; // rewrite the event's target oid using the oid currently configured on the // distributed object (we will have it mapped in our remote server's oid space, // but it may have been remapped into the oid space of the local server) event . setTargetOid ( target . getOid ( ) ) ; // assign an eventId to this event so that our stale event detection code can // properly deal with it event . eventId = PeerNode . this . _omgr . getNextEventId ( true ) ; } @ Override protected Communicator createCommunicator ( ) { return PeerNode . this . createCommunicator ( this ) ; } @ Override protected boolean isFailureLoggable ( FailureType type ) { return ( type != FailureType . UNSUBSCRIBE_NOT_PROXIED ) && super . isFailureLoggable ( type ) ; } } ; _client . addClientObserver ( this ) ; _client . getInvocationDirector ( ) . setMaximumListenerAge ( getMaximumInvocationWait ( ) ) ; }
Initializes this peer node and creates its internal client .