com.kuka.roboticsAPI.controllerModel.sunrise.connectionLib
Class Connection

java.lang.Object
  extended by com.kuka.roboticsAPI.controllerModel.sunrise.connectionLib.Connection

public final class Connection
extends Object

A connection is a high level communication mechanism. It abstracts from the underlying protocol used to transfer the data.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

Constructor Summary
Connection(ConnectionType connectionType, String name, NameserverProxy nameserver)
          Creates a new connection.
 
Method Summary
 void dispose()
          Disposes the connection.
 ConnectionType getConnectionType()
          Gets the type of the connection.
 String getName()
          Gets the name of the connection.
 void initialize()
          Initializes the connection.
 boolean isInitialized()
          Returns true if this connection is initialized.
 Message receive()
          Receives a message.
 void send(Message message)
          Sends the given message over the channel.
 String toString()
          
 Message tryReceive(int timeout, TimeUnit timeUnit)
          Tries to receive a message from the channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Connection

public Connection(ConnectionType connectionType,
                  String name,
                  NameserverProxy nameserver)
Creates a new connection.

Parameters:
connectionType - The type of the connection.
name - The name of the connection.
nameserver - The nameserver which should be used for requests.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
Method Detail

initialize

public void initialize()
Initializes the connection.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

dispose

public void dispose()
Disposes the connection.

Will not throw an exception.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

receive

public Message receive()
Receives a message. Blocks until one is available.

Returns:
The received message.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

tryReceive

public Message tryReceive(int timeout,
                          TimeUnit timeUnit)
Tries to receive a message from the channel.

Parameters:
timeout - The timeout value.
timeUnit - The timeout until
Returns:
The received message or null if no message was received in the given timeout.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

send

public void send(Message message)
Sends the given message over the channel.

Parameters:
message - The message to send.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

toString

public String toString()

Overrides:
toString in class Object
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getName

public String getName()
Gets the name of the connection.

Returns:
The name of the connection.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getConnectionType

public ConnectionType getConnectionType()
Gets the type of the connection.

Returns:
The type of the connection.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

isInitialized

public boolean isInitialized()
Returns true if this connection is initialized.

Returns:
True if this connection is initialized.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.


Copyright © 2019. All rights reserved.