net.user1.union.api
Interface Connection


public interface Connection

Represents a Connection to Union. ClientSetup will use this Object when creating the server side LocalClient.


Method Summary
 java.lang.String getAddress()
          Return the address that will be used to identify this Connection (eg.
 Gateway getGateway()
          Returns the Gateway to which this Connection connected.
 java.lang.String getRefusalDescription()
          A string providing information about the condition that led to the refusal.
 java.lang.String getRefusalReason()
          A string representing the reason for the connection refusal.
 void refuse(java.lang.String reason, java.lang.String description)
          Refuse the Connection.
 

Method Detail

getGateway

Gateway getGateway()
Returns the Gateway to which this Connection connected.


getAddress

java.lang.String getAddress()
Return the address that will be used to identify this Connection (eg. IP). Connections with the same address will be considered from the same source for the purposes of security such as banning an address.


refuse

void refuse(java.lang.String reason,
            java.lang.String description)
Refuse the Connection. The Connection will be disconnected from the server and sent a CONNECTION_REFUSED (u164) with the reason and description provided.

Parameters:
reason - - reason argument is a code that indicates why the client connection was refused (eg. BANNED)
description - - explains the cause of the refusal

getRefusalReason

java.lang.String getRefusalReason()
A string representing the reason for the connection refusal. Example: "BANNED"

Returns:
a string representing the reason for the connection refusal

getRefusalDescription

java.lang.String getRefusalDescription()
A string providing information about the condition that led to the refusal. Example: "bannedAt|duration|banReason"

Returns:
a string providing information about the condition that led to the refusal


Copyright USER1 Subsystems Corporation - Tue Jan 28 2014, 05:05 PM -0500