Type Definitions
-
Address
-
Type:
- Object
- Source:
Properties:
Name Type Description ipaddress
string The IP address port
number The port for this address -
BodyHandler(buffer)
-
Parameters:
Name Type Description buffer
module:vertx/buffer~Buffer A Buffer object containing the body of the message - Source:
-
ConnectHandler(netSocket)
-
Parameters:
Name Type Description netSocket
module:vertx/net.NetSocket The raw socket - Source:
-
DeploymentId
-
A DeploymentId is used to identify a specific verticle deployment.
Type:
- string
- Source:
- See:
-
FileProps
-
Type:
- Object
- Source:
Properties:
Name Type Description creationTime
date The date the file was created lastAccessTime
date The date the file was last accessed lastModifiedTime
date The date the file was last modified isDirectory
boolean is the file a directory? isOther
boolean Is the file some other type? I.e. not a directory, regular file or symbolic link isRegularFile
boolean is the file a regular file? isSymbolicLink
boolean is the file a symlink? size
number the size of the file in bytes -
FileSystemProps
-
Type:
- Object
- Source:
Properties:
Name Type Description totalSpace
number The total space on the file system, in bytes unallocatedSpace
number The total unallocated space on the file syste, in bytes usableSpace
number The total usable space on the file system, in bytes -
Flag
-
Flags used when opening files working with the vert.x
FileSystem
Type:
- number
- Source:
-
Handler()
-
Vert.x makes heavy use of callback handlers in the API. A basic handler is simply a function that is called when vert.x events are fired, and expects no parameters.
- Source:
- See:
-
ListenHandler()
-
A
ListenHandler
is aHandler
that is notified when a call tomodule:vertx/net.NetServer#listen
has been initiated and the underlying socket has been bound.- Source:
-
Message
-
While JSON is the preferred messaging on the event bus, you can send any basic type as a message, for example,
string
,boolean
, etc. can all be passed directly intomodule:vertx/event_bus.send
. You may also sendmodule:vertx/buffer~Buffer
s and plain old Javascript objects. Objects will be converted toJSON
before being placed on the bus.Type:
- string | boolean | number | Object | JSON | module:vertx/buffer~Buffer
- Source:
- See:
-
MessageHandler(message)
-
A
MessageHandler
is aHandler
that responds to messages on themodule:vertx/event_bus
module.MessageHandler
s are called with aMessage
object as the parameter.Parameters:
Name Type Description message
Message The message - Source:
- See:
-
MxRecord
-
Represents a DNS MX record.
Type:
- Object
- Source:
Properties:
Name Type Description priority
number The record priority name
string The record name -
PacketHandler(datagramPacket)
-
Parameters:
Name Type Description datagramPacket
module:vertx/datagram.DatagramPacket The received packet - Source:
-
RequestHandler(request)
-
A
RequestHandler
is aHandler
that responds to notifications from objects in thevertx/http
module and expects anHttpServerRequest
object as its parameter.Parameters:
Name Type Description request
message The incoming message Example
var http = require('vertx/http'); var server = http.createHttpServer(); server.requestHandler( function( request ) { // This function is executed for each // request event on our server } );
-
ResponseHandler(response)
-
Parameters:
Name Type Description response
module:vertx/http.HttpClientResponse The HTTP client response - Source:
-
ResultHandler(cause, result)
-
File system operations are handled asynchronously. The result of the operations are given to a
ResultHandler
. TheResultHandler
is just aHandler
that accepts two parameters: 1) an exception object if an error occurred; and 2) the result of the operation, the type of which is determined by the firing event.Parameters:
Name Type Description cause
Exception This will be null
if the operation succeededresult
Object The result of the operation event this handler cares about - Source:
-
SockJSHandler(sockJSSocket)
-
A
SockJSHandler
is aHandler
that is called when new SockJSSockets are created. It takes a {module:vertx/sockjs.SockJSSocket} as its only parameter.Parameters:
Name Type Description sockJSSocket
module:vertx/sockjs.SockJSSocket The socket object - Source:
-
SrvRecord
-
Represents a DNS SRV record
Type:
- Object
- Source:
Properties:
Name Type Description priority
number The record priority weight
number The record weight port
number The record port name
string The record name protocol
string The record protocol service
string The record service target
string The record target -
TimerId
-
A TimerId is just a number that identifies a given timer.
Type:
- number
- Source:
- See:
-
UploadHandler(upload)
-
An
UploadHandler
is aHandler
that accepts aHttpServerFileUpload
object as it's parameter. This allows server code to handle and process uploaded files from HTTP clients.Parameters:
Name Type Description upload
module:vertx/http.HttpServerFileUpload The file being uploaded - Source:
-
WebSocketHandler(websocket)
-
Parameters:
Name Type Description websocket
module:vertx/http.WebSocket the active WebSocket
- Source: