Configuration Platform SDK 7.6 API Reference

com.genesyslab.platform.commons.protocol
Class Endpoint

java.lang.Object
  extended bycom.genesyslab.platform.commons.protocol.Endpoint

public class Endpoint
extends java.lang.Object

You can use an Endpoint to describe a server that your application will be communicating with, by giving the server's name, host and port.


Constructor Summary
Endpoint(java.lang.String name, java.lang.String host, int port)
           
Endpoint(java.lang.String name, java.net.URI uri)
          Creates Endpoint using information from URI.
Endpoint(java.net.URI uri)
          Creates Endpoint using information from URI.
 
Method Summary
 ConnectionConfiguration getConfiguration()
          Creates configuration object from query string of the Endpoint.
 java.lang.String getHost()
           
 java.lang.String getName()
           
 int getPort()
           
 java.net.URI getUri()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Endpoint

public Endpoint(java.lang.String name,
                java.lang.String host,
                int port)

Endpoint

public Endpoint(java.net.URI uri)
Creates Endpoint using information from URI. URI is expected to have following form: <protocol>::[<protocolName>@]<host>:<port>[/?<configKey>=<configValue>[&<configKey>=<configValue>...]]

Example:
tcp://localVoice@localhost:5777/?protocol=addp&addp-remote-timeout=5&addp-trace=remote

Parameters:
uri - URI to construct Endpoint from

Endpoint

public Endpoint(java.lang.String name,
                java.net.URI uri)
Creates Endpoint using information from URI. The name part of the URI is ignored and one from parameter is used (unless parameter is null). URI is expected to have following form: <protocol>::[<protocolName>@]<host>:<port>[/?<configKey>=<configValue>[&<configKey>=<configValue>...]]

Example:
tcp://localVoice@localhost:5777/?protocol=addp&addp-remote-timeout=5&addp-trace=remote

Parameters:
name - protocol name
uri - URI to construct Endpoint from
Method Detail

getName

public java.lang.String getName()

getHost

public java.lang.String getHost()

getPort

public int getPort()

getUri

public java.net.URI getUri()

toString

public java.lang.String toString()

getConfiguration

public ConnectionConfiguration getConfiguration()
Creates configuration object from query string of the Endpoint. This method will return null if Endpoint wasn't craeted with URI.

Returns:
configuration object or null

Configuration Platform SDK 7.6 API Reference

Send comments on this topic.
Copyright © 2006–2008 Genesys Telecommunication Laboratories, Inc. All rights reserved.