com.cafesoft.core.message
Interface ConnectionMetaData

All Superinterfaces:
Recyclable
All Known Implementing Classes:
StandardConnectionMetaData

public interface ConnectionMetaData
extends Recyclable

A container object which contains meta-data about the Message Framework's Connection Object

Since:
6/13/02
See Also:
Connection

Method Summary
 Object get(String namespace, String name)
          Get a value from the NamespaceMap
 String getAgentType()
          Get the type of agent using this Connection
 String getLocalAddress()
          Get the local IP address
 String getLocalHost()
          Get the local host name
 int getLocalPort()
          Get the local port number
 String[] getNames(String namespace)
          Get the names of all the values in the NamespaceMap
 String[] getNamespaces()
          Get all value namespaces.
 String getRemoteAddress()
          Get the remote IP address
 String getRemoteHost()
          Get the remote host name
 int getRemotePort()
          Get the remote port number
 String getUsername()
          Get the authenticated username
 boolean isSecure()
          Determine if a connection is secure
 void put(String namespace, String name, Object value)
          Put an value into NamespaceMap Put an object into the NamespaceMap via a name string and namespace.
 void remove(String namespace, String name)
          Remove a value from the NamespaceMap
 void setSecure(boolean secure)
          Set the secure connection status
 void setUsername(String username)
          Set the authenticated username
 
Methods inherited from interface com.cafesoft.core.util.Recyclable
recycle
 

Method Detail

getLocalAddress

public String getLocalAddress()
Get the local IP address

Returns:
the local IP address

getLocalPort

public int getLocalPort()
Get the local port number

Returns:
the local port number

getLocalHost

public String getLocalHost()
Get the local host name

Returns:
the local host name

getRemoteAddress

public String getRemoteAddress()
Get the remote IP address

Returns:
the remote IP address

getRemotePort

public int getRemotePort()
Get the remote port number

Returns:
the remote port number

getRemoteHost

public String getRemoteHost()
Get the remote host name

Returns:
the remote host name

getUsername

public String getUsername()
Get the authenticated username

Returns:
the username the connection authenticated with

setUsername

public void setUsername(String username)
Set the authenticated username

Parameters:
username - the authenticated username

isSecure

public boolean isSecure()
Determine if a connection is secure

Returns:
returns true if connection is secure, false otherwise

setSecure

public void setSecure(boolean secure)
Set the secure connection status

Parameters:
secure - the secure connection status

getAgentType

public String getAgentType()
Get the type of agent using this Connection

Returns:
the type of agent as a String object

put

public void put(String namespace,
                String name,
                Object value)
Put an value into NamespaceMap

Put an object into the NamespaceMap via a name string and namespace.

Parameters:
namespace - a namespace used to distinguish a name (perhaps used by a particular application), from an identical name used in another context. If null, then use the "default" namespace.
name - the name of the value
value - The value to insert into the NamespaceMap
Throws:
IllegalArgumentException - thrown if the name is null

remove

public void remove(String namespace,
                   String name)
Remove a value from the NamespaceMap

Parameters:
namespace - the namespace of the name/value pair
name - the name string of the value to remove
Throws:
IllegalArgumentException - thrown if the name is null

get

public Object get(String namespace,
                  String name)
Get a value from the NamespaceMap

Parameters:
namespace - the namespace of the name/value pair
name - the name string to get the value for
Returns:
The value from the NamespaceMap, null if the name doesn't exist.
Throws:
IllegalArgumentException - thrown if the name is null

getNamespaces

public String[] getNamespaces()
Get all value namespaces.

Returns:
a String array of all namespaces used for values currently stored in the NamespaceMap including the "default" namepace.

getNames

public String[] getNames(String namespace)
Get the names of all the values in the NamespaceMap

Parameters:
namespace - the namespace of values to be retrieved. If null the default namespace is used.
Returns:
A String array of all names in the NamespaceMap that contain values


Generated on 10:40:31 AM September 10, 2003, © 1996-2003 Cafésoft LLC. All rights reserved.