com.pcbsys.nirvana.direct.Transport Class Reference
The Transport class is the main class used within Nirvana Direct applications. More...
Public Member Functions | |
| Topic | bindTopic (String topic) throws ClientTransportException |
| Used to bind the transport with the required topic. | |
| void | stop () throws ClientTransportException |
| Stop the transport and all consumers. | |
Static Public Member Functions | |
| static Transport | connectToTransport (String url, String user) throws ClientTransportException |
| Creates a connection to a remote service, using the specified url and user name. | |
| static Transport | startTransport (String binding, String transportName, String user) throws ClientTransportException |
| Starts the Transport object in Service Mode, where the transport service will be available at the binding address specified. | |
Detailed Description
The Transport class is the main class used within Nirvana Direct applications.It has 2 main modes:
- Transport Service Mode
- Remote Listener Mode
A Nirvana Direct Transport object is constructed either in Service mode when you call the startTransport method, and pass in the binding information for the service. When you call the connectToServiceMode, the Transport is constructed in Remote Listener mode, and will connect to the service at the given url address.
Member Function Documentation
| Topic com.pcbsys.nirvana.direct.Transport.bindTopic | ( | String | topic | ) | throws ClientTransportException |
Used to bind the transport with the required topic.
Many topics can be bound to the Transport service
- Parameters:
-
topic the topic name you wish to create / bind to
| static Transport com.pcbsys.nirvana.direct.Transport.connectToTransport | ( | String | url, | |
| String | user | |||
| ) | throws ClientTransportException [static] |
Creates a connection to a remote service, using the specified url and user name.
- Parameters:
-
url the service location user the user name used when performing operations on the transport
- Returns:
- a newly created Transport object
| static Transport com.pcbsys.nirvana.direct.Transport.startTransport | ( | String | binding, | |
| String | transportName, | |||
| String | user | |||
| ) | throws ClientTransportException [static] |
Starts the Transport object in Service Mode, where the transport service will be available at the binding address specified.
- Parameters:
-
binding the binding information for the service (protocol://interface:port) . For example : nsp://0.0.0.0:9000, where 0.0.0.0 specified to bind to all known network interfaces transportName unique name that the transport service will be know as user name that will be used to authenticate the operations performed on the service
- Returns:
- a newly created Transport object
