# File lib/core/event.rb, line 78
    def _context
      x = Cproton.pn_event_context(@impl)
      case Cproton.pn_class_id(Cproton.pn_event_class(@impl))
      when Cproton::CID_pn_transport then Transport.wrap(Cproton.pn_cast_pn_transport(x))
      when Cproton::CID_pn_connection then Connection.wrap(Cproton.pn_cast_pn_connection(x))
      when Cproton::CID_pn_session then Session.wrap(Cproton.pn_cast_pn_session(x))
      when Cproton::CID_pn_link then Link.wrap(Cproton.pn_cast_pn_link(x))
      when Cproton::CID_pn_delivery then Delivery.wrap(Cproton.pn_cast_pn_delivery(x))
      end
    end