# Class: DestinationFactory

## vertx-stomp-js/destination_factory~ DestinationFactory

#### new DestinationFactory()

Interface implemented to customize the destination creation.

Source:
  - vertx-stomp-js/destination_factory.js, line 31

### Methods

#### create(vertx, name) → {Destination}

Creates a destination for the given address.

##### Parameters:

Name | Type | Description
--- | --- | ---
`vertx` | Vertx | the vert.x instance used by the STOMP server.
`name` | string | the destination name.

Source:
  - vertx-stomp-js/destination_factory.js, line 44

##### Returns:

the destination, `null` to reject the creation.

Type
  Destination