- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 25 for onEvent (0.54 seconds)
-
okhttp-testing-support/src/main/kotlin/okhttp3/EventListenerAdapter.kt
call: Call, ioe: IOException, ) = onEvent(ResponseFailed(System.nanoTime(), call, ioe)) override fun callEnd(call: Call) = onEvent(CallEnd(System.nanoTime(), call)) override fun callFailed( call: Call, ioe: IOException, ) = onEvent(CallFailed(System.nanoTime(), call, ioe)) override fun canceled(call: Call) = onEvent(Canceled(System.nanoTime(), call))Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 7.1K bytes - Click Count (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/EventListenerRelay.kt
val eventRecorder: EventRecorder, ) { private val eventListenerAdapter = EventListenerAdapter() .apply { listeners += ::onEvent } val eventListener: EventListener get() = eventListenerAdapter var eventCount = 0 private fun onEvent(callEvent: CallEvent) { if (eventCount++ == 0) { eventRecorder.logEvent(callEvent) val next = EventListenerRelay(call, eventRecorder)Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Nov 05 18:28:35 GMT 2025 - 1.5K bytes - Click Count (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt
private val callback: Callback, ) { private var lastId: String? = null interface Callback { fun onEvent( id: String?, type: String?, data: String, ) fun onRetryChange(timeMs: Long) } /** * Process the next event. This will result in a single call to [Callback.onEvent] *unless* the * data section was empty. Any number of calls to [Callback.onRetryChange] may occur whileCreated: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 4.3K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/ReactorReader.java
ReactorReaderSpy(Lookup lookup) { this.lookup = lookup; } @Override public void init(Context context) throws Exception {} @Override public void onEvent(Object event) throws Exception { if (event instanceof ExecutionEvent executionEvent) { ReactorReader reactorReader = lookup.lookup(ReactorReader.class);
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Mon Dec 15 11:20:38 GMT 2025 - 24.4K bytes - Click Count (0) -
compat/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
cliRequest.request.setRepositoryCache(new DefaultRepositoryCache()); } eventSpyDispatcher.onEvent(request); MavenExecutionResult result = maven.execute(request); eventSpyDispatcher.onEvent(result); eventSpyDispatcher.close(); if (result.hasExceptions()) {
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Mon Oct 27 13:24:03 GMT 2025 - 78.1K bytes - Click Count (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/LookupInvoker.java
.build(); customizeSettingsRequest(context, settingsRequest); if (context.eventSpyDispatcher != null) { context.eventSpyDispatcher.onEvent(settingsRequest); } context.logger.debug("Reading installation settings from '" + installationSettingsFile + "'"); context.logger.debug("Reading project settings from '" + projectSettingsFile + "'");
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Tue Oct 28 13:01:07 GMT 2025 - 43.2K bytes - Click Count (0) -
tests/test_router_events.py
def app_shutdown() -> None: state.app_shutdown = True router = APIRouter() @router.on_event("startup") def router_startup() -> None: state.router_startup = True @router.on_event("shutdown") def router_shutdown() -> None: state.router_shutdown = True sub_router = APIRouter() @sub_router.on_event("startup") def sub_router_startup() -> None:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 11.7K bytes - Click Count (0) -
docs_src/app_testing/tutorial003_py310.py
from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI() items = {} @app.on_event("startup") async def startup_event(): items["foo"] = {"name": "Fighters"} items["bar"] = {"name": "Tenders"} @app.get("/items/{item_id}") async def read_items(item_id: str): return items[item_id] def test_read_items(): with TestClient(app) as client:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 528 bytes - Click Count (0) -
docs_src/events/tutorial002_py310.py
from fastapi import FastAPI app = FastAPI() @app.on_event("shutdown") def shutdown_event(): with open("log.txt", mode="a") as log: log.write("Application shutdown") @app.get("/items/") async def read_items():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 255 bytes - Click Count (0) -
docs_src/events/tutorial001_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 283 bytes - Click Count (0)