Whatever message this page gives is out now! Go check it out!

stop

Last update:
May 18, 2026

Description

Stops a gateway if it is running.

Category

Event Gateway Development

Syntax

public void stop()

See also

restart startStarting, stopping, and restarting the event gateway in  Building an event gateway  in the Developing ColdFusion Applications

Usage

Stops a gateway by performing any required clean-up operations. This method stops any listener thread or threads that monitor the gateway's event source and releases any other resources. The ColdFusion Administrator calls this function when it stops a gateway instance.This method should update the status information that is returned by the getStatus method to indicate when the gateway is stopping and when the gateway is stopped.

Example

The following example is the ColdFusion SocketGateway class stop method:
public void stop() { status = STOPPING; listening=false; Enumeration e = socketRegistry.elements(); while (e.hasMoreElements()) { try { ((SocketServerThread)e.nextElement()).socket.close(); } catch (IOException e1) { e1.printStackTrace(); } } if (serverSocket != null) { try { serverSocket.close(); } catch (IOException e1) { } serverSocket = null; } status = STOPPED; }

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page