com.pcbsys.nirvana.nAdminAPI.nClusterNode Class Reference

Contains the status and configuration of a Nirvana cluster. More...

Inheritance diagram for com.pcbsys.nirvana.nAdminAPI.nClusterNode:
com.pcbsys.nirvana.nAdminAPI.nContainer com.pcbsys.nirvana.nAdminAPI.nNode com.pcbsys.nirvana.client.Observable

Public Member Functions

void addConnectionListener (nClusterConnectionListener listener)
 Adds a nClusterConnectionListener to the cluster to receive callbacks as connections are made or lost to any realms within the cluster. More...
 
void addConnectionListenerToAllLeafNodes (nConnectionListener listener)
 Adds a nConnectionListener to each nLeaNode of each nRealmNode in the cluster More...
 
void addListener (nClusterEventListener listener)
 Adds a nClusterEventListener to the cluster to receive callbacks as the state of the cluster changes. More...
 
void addMember (nClusterMemberConfiguration node)
 Adds a new node to an existing cluster. More...
 
bool canBeMaster (nRealmNode node)
 Tests to see if the supplied node can be master of the cluster. More...
 
void close ()
 Closes connections to all realms for the specified Nirvana Realm server. More...
 
override void closed (nRealmNode node)
 Called when the nRealmNode is closed, for internal use only. More...
 
nClusterSite createSite (string name, string initialRealm)
 Method that allows you to create a site from a cluster node More...
 
void delConnectionListener (nClusterConnectionListener listener)
 Removes a nClusterConnectionListener from the cluster More...
 
void deleteMember (nRealmNode node)
 Removes the specified realm from the cluster. More...
 
void deleteMember (nRealmNode node, bool deleteStore)
 Removes the specified realm from the cluster. More...
 
void deleteSite (nClusterSite site)
 Method that allows you to delete a site More...
 
void delListener (nClusterEventListener listener)
 Deregisters a nClusterEventListener from the cluster for callbacks. More...
 
void deregisterRemoteCluster (nClusterNode remoteCluster)
 Removes a logical connection from this cluster node to a remote cluster node. More...
 
void destroy ()
 Deletes the cluster and removes all known realms from the cluster. More...
 
void destroy (bool deleteStore)
 Deletes the cluster and removes all known realms from the cluster. More...
 
ArrayList getClusterConnectionStatus ()
 Returns an ArrayList of nClusterStatus which contains the current cluster status. More...
 
nRealmNode getMaster ()
 Returns the current master of the cluster. More...
 
nRealmNode getMaster (long timeout)
 Returns the current master of the cluster. More...
 
int getNoOfSites ()
 Returns the number of defined nClusterSite objects More...
 
nClusterSite getSite (string site)
 Returns an nClusterSite object with the specified name More...
 
IEnumerator getSites ()
 Returns an iterator of nClusterSite objects More...
 
bool hasMember (nRealmNode node)
 Tests to see if the supplied node is part of the cluster. More...
 
bool hasMember (string realm)
 Tests to see if the supplied realm name is part of the cluster. More...
 
bool hasquorum ()
 Tests to see if the cluster has quorum and is functioning. More...
 
bool hasSites ()
 Indicated whether this node has sites More...
 
void joinRemoteClusterStore (nLeafNode source, nLeafNode destination, bool isRouted, int hopCount, String selector, bool allowPurge)
 Joins one clustered channel or queue to another clustered channel or queue on a remote cluster. More...
 
void modifyMember (nClusterMemberConfiguration config)
 Modifies the specified realm in the cluster as far as the CanBeMaster flag. More...
 
void registerRemoteCluster (nClusterNode remoteCluster)
 Creates a logical connection between this cluster node and another remote cluster node. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.nAdminAPI.nContainer
void addACLEntries (nACL acl)
 Adds a list of acl entry to all known nodes within the nContainer node. More...
 
void addACLEntries (nACL acl, nNode[] nodes)
 Adds a list acl entry to all nodes contained with in the array of nNodes More...
 
virtual void addACLEntry (nACLEntry entry)
 Adds a specific acl entry to all known nodes within the nContainer node. More...
 
virtual void addACLEntry (nACLEntry entry, bool allChannels, bool allQueues, bool allServices)
 Adds a specific acl entry to all known nodes within the nContainer node. More...
 
virtual nNode findNode (string name)
 Given a name of the form /container/container/name this function will locate the name object and return it, or null if that object can not be found. More...
 
virtual nNode findNode (nNode node)
 Given a name of the form /container/container/name this function will locate the nNode object and return it, or null if that can not be found. More...
 
virtual nNode findNode (nNode node, bool searchChildren)
 Given a name of the form /container/container/name this function will locate the name object and return it, or null if that can not be found. More...
 
nNode getNextSibling ()
 Method to return the next sibling from this node's parent More...
 
virtual nNode getNextSibling (int idx)
 Returns the sibling at position idx from this nodes parent. More...
 
virtual
System.Collections.IEnumerator 
getNodes ()
 Returns an IEnumerator of all the nodes under this container. More...
 
virtual nRealmNode getRealmAt (string name)
 Given a mount point this function will return a realm if one exists at the specified mount point More...
 
nRealmNode getRealmNode ()
 Get method for the realm node which acts as a container for this object More...
 
virtual int getSize ()
 Returns the number of nodes under this container. More...
 
virtual int getTotalNodes ()
 Returns the total number of nodes within this container and all subsequent children by traversing the entire structure beneath this container node More...
 
virtual bool hasRealmAt (string name)
 Given a mount point this function will determine if this container contains a mounted realm at the specified mount point More...
 
void modACLEntries (nACL acl)
 Modifies a list of acl entry to all known nodes within the nContainer node. More...
 
void modACLEntries (nACL acl, nNode[] nodes)
 Modifies a list of acl entry to all nodes contained with in the array of nNodes More...
 
virtual void modACLEntry (nACLEntry entry)
 modifies a specific acl entry's permissions for all known nodes within the nContainer node. More...
 
virtual void modACLEntry (nACLEntry entry, bool allChannels, bool allQueues, bool allServices)
 modifies a specific acl entry's permissions for all known nodes within the nContainer node. More...
 
void removeACLEntries (nACL acl)
 Removes a list of acl entries from all known nodes within the nContainer node. More...
 
void removeACLEntries (nACL acl, nNode[] nodes)
 Removes a list of acl entries from all nodes contained with in the array of nNodes More...
 
virtual void removeACLEntry (nACLEntry entry)
 removes a specific acl entry from all known nodes within the nContainer node. More...
 
virtual void removeACLEntry (nACLEntry entry, bool allChannels, bool allQueues, bool allServices)
 removes a specific acl entry from all known nodes within the nContainer node. More...
 
virtual void setACL (nACL acl)
 Replaces the existing ACL with the nACL supplied to all known nodes within the nContainer node. More...
 
virtual void setACL (nACL acl, bool allChannels, bool allQueues, bool allServices)
 Replaces the existing ACL with the nACL supplied to all known nodes within the nContainer node. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.nAdminAPI.nNode
bool Equals (long aLong)
 Needed as part of the SortedObject interface. More...
 
override bool Equals (object item)
 Compares this object with the passed object More...
 
virtual string getAbsolutePath ()
 This function walks the tree to the root to generate a fully qualified name for this node More...
 
virtual nNode getParent ()
 Returns this nodes parent node. More...
 
virtual string getRelativePath (nNode top)
 This method returns the relative path from this node to the nNode passed. More...
 
virtual bool lessThan (long aLong)
 Needed as part of the SortedObject interface. More...
 
virtual bool lessThan (object item)
 Compares this object with the passed object. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.client.Observable
void addObserver (IObserver o)
 Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set. More...
 
int countObservers ()
 Returns the number of observers of this Observable object. More...
 
void deleteObserver (IObserver o)
 Deletes an observer from the set of observers of this object. More...
 
void deleteObservers ()
 Clears the observer list so that this object no longer has any observers. More...
 
bool hasChanged ()
 Tests if this object has changed. More...
 
void notifyObservers ()
 If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed. More...
 
void notifyObservers (Object arg)
 If this object has changed, as indicated by the More...
 
 Observable ()
 Construct an Observable with zero Observers. More...
 

Static Public Member Functions

static nClusterNode create (string clusterName, nClusterMemberConfiguration[] realms)
 Creates a new cluster with the supplied array of nClusterMemberConfiguration. More...
 
static nClusterNode create (string clusterName, nClusterMemberConfiguration[] realms, bool convertLocal)
 Creates a new cluster with the supplied array of nClusterMemberConfiguration. More...
 
static nClusterNode create (string clusterName, nClusterMemberConfiguration[] realms, bool convertLocal, nClusterConversionStatus callback)
 Creates a new cluster with the supplied array of nClusterMemberConfiguration. More...
 
static nClusterNode find (string clusterName)
 Returns the nClusterNode for the specified clusterName. More...
 
static nClusterNode getInstance (string rname)
 Creates an instance of a nClusterNode for any cluster found on the realm specified by the rname. More...
 
static nClusterNode getInstance (nSessionAttributes attr, string username)
 Creates an instance of a nClusterNode for any cluster found on the realm specified by the nSessionAttributes and the username. More...
 
static nClusterNode getInstance (nSessionAttributes attr)
 Creates an instance of a nClusterNode for any cluster found on the realm specified by the nSessionAttributes. More...
 
static ArrayList getKnownClusters ()
 Return an ArrayList of nCluster nodes. More...
 

Additional Inherited Members

- Protected Member Functions inherited from com.pcbsys.nirvana.client.Observable
void clearChanged ()
 Indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the hasChanged method will now return false. More...
 
void setChanged ()
 Marks this Observable object as having been changed; the hasChanged method will now return true. More...
 
- Properties inherited from com.pcbsys.nirvana.nAdminAPI.nNode
virtual string Name [get]
 Returns the generic name of this node within the namespace More...
 

Detailed Description

Contains the status and configuration of a Nirvana cluster.

Each Nirvana cluster is made up of multiple Nirvana Realm servers and this group is given a name, the Cluster Name. The class supplies helper functions to query, create and delete clusters.

Member Function Documentation

void com.pcbsys.nirvana.nAdminAPI.nClusterNode.addConnectionListener ( nClusterConnectionListener  listener)

Adds a nClusterConnectionListener to the cluster to receive callbacks as connections are made or lost to any realms within the cluster.

Parameters
listenerto register for callbacks.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.addConnectionListenerToAllLeafNodes ( nConnectionListener  listener)

Adds a nConnectionListener to each nLeaNode of each nRealmNode in the cluster

Parameters
listenerto register for callbacks.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.addListener ( nClusterEventListener  listener)

Adds a nClusterEventListener to the cluster to receive callbacks as the state of the cluster changes.

Parameters
listenerto register for callbacks.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.addMember ( nClusterMemberConfiguration  node)

Adds a new node to an existing cluster.

Parameters
nodedetails about the new node to add.
Exceptions
nSessionNotConnectedExceptionif unable to connect to the new node.
nRequestTimedOutExceptionif the node fails to respond within the timout period.
nSecurityExceptionif the client has no administration priviliges on the node.
nBaseClientExceptionif any unexpected exceptions are raised.
bool com.pcbsys.nirvana.nAdminAPI.nClusterNode.canBeMaster ( nRealmNode  node)

Tests to see if the supplied node can be master of the cluster.

Parameters
nodeto test.
Returns
true if the node is defined as able to be master.
Exceptions
nSecurityExceptionif the client is not authorized.
nBaseClientExceptionif the node is not connected.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.close ( )

Closes connections to all realms for the specified Nirvana Realm server.

override void com.pcbsys.nirvana.nAdminAPI.nClusterNode.closed ( nRealmNode  node)
virtual

Called when the nRealmNode is closed, for internal use only.

Parameters
nodeThe nRealmNode which has been closed

Reimplemented from com.pcbsys.nirvana.nAdminAPI.nContainer.

static nClusterNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.create ( string  clusterName,
nClusterMemberConfiguration[]  realms 
)
static

Creates a new cluster with the supplied array of nClusterMemberConfiguration.

Parameters
clusterNameName of the new cluster.
realmsarray of nClusterMemberConfiguration to use to generate the cluster.
Returns
nClusterNode of the resulting cluster.
Exceptions
nSessionNotConnectedExceptionif unable to connect to any of the realms.
nSecurityExceptionif no administration rights on any of the realms.
nRequestTimedOutExceptionif any of the realms fail to respond within the time out period.
nIllegalArgumentExceptionif any of the realms specify the same physical realm.
nSessionPausedExceptionif any of the realms sessions are paused.
nUnexpectedResponseExceptionif any of the realms respond incorrectly.
nRealmUnreachableExceptionif any of the realms are currently unreachable.
nNameSpaceConflictExceptionif any of the realms conflict with anothers namespace.
nRealmNotFoundExceptionif any of the realms are not found.
static nClusterNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.create ( string  clusterName,
nClusterMemberConfiguration[]  realms,
bool  convertLocal 
)
static

Creates a new cluster with the supplied array of nClusterMemberConfiguration.

Parameters
clusterNameName of the new cluster.
realmsarray of nClusterMemberConfiguration to use to generate the cluster.
convertLocalFlag to indicate that the first master realm in the list should have the local stores converted to cluster wide stores
Returns
nClusterNode of the resulting cluster.
Exceptions
nSessionNotConnectedExceptionif unable to connect to any of the realms.
nSecurityExceptionif no administration rights on any of the realms.
nRequestTimedOutExceptionif any of the realms fail to respond within the time out period.
nIllegalArgumentExceptionif any of the realms specify the same physical realm.
nSessionPausedExceptionif any of the realms sessions are paused.
nUnexpectedResponseExceptionif any of the realms respond incorrectly.
nRealmUnreachableExceptionif any of the realms are currently unreachable.
nNameSpaceConflictExceptionif any of the realms conflict with anothers namespace.
nRealmNotFoundExceptionif any of the realms are not found.
static nClusterNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.create ( string  clusterName,
nClusterMemberConfiguration[]  realms,
bool  convertLocal,
nClusterConversionStatus  callback 
)
static

Creates a new cluster with the supplied array of nClusterMemberConfiguration.

Parameters
clusterNameName of the new cluster.
realmsarray of nClusterMemberConfiguration to use to generate the cluster.
convertLocalFlag to indicate that the first master realm in the list should have the local stores converted to cluster wide stores
callbackA callback to indicate the status of the cluster formation. Useful when converting an exisiting realm with stores into a cluster
Returns
nClusterNode of the resulting cluster.
Exceptions
nSessionNotConnectedExceptionif unable to connect to any of the realms.
nSecurityExceptionif no administration rights on any of the realms.
nRequestTimedOutExceptionif any of the realms fail to respond within the time out period.
nIllegalArgumentExceptionif any of the realms specify the same physical realm.
nSessionPausedExceptionif any of the realms sessions are paused.
nUnexpectedResponseExceptionif any of the realms respond incorrectly.
nRealmUnreachableExceptionif any of the realms are currently unreachable.
nNameSpaceConflictExceptionif any of the realms conflict with anothers namespace.
nRealmNotFoundExceptionif any of the realms are not found.

nClusterConversionStatus

nClusterSite com.pcbsys.nirvana.nAdminAPI.nClusterNode.createSite ( string  name,
string  initialRealm 
)

Method that allows you to create a site from a cluster node

Parameters
namethe name of the site to create
initialRealmthe initial realm that will be added to the site
Returns
a new cluster site object
Exceptions
Exceptionif the site was not able to be created
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.delConnectionListener ( nClusterConnectionListener  listener)

Removes a nClusterConnectionListener from the cluster

Parameters
listenerto register for callbacks.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.deleteMember ( nRealmNode  node)

Removes the specified realm from the cluster.

The cluster must be running and all members of the cluster online for this to work correctly.

Parameters
nodeto remove from the cluster.
Exceptions
nBaseClientExceptionif any nodes fail during the process.
nSessionNotConnectedExceptionif any of the nodes are not connected.
nSecurityExceptionif the client is not authorised.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.deleteMember ( nRealmNode  node,
bool  deleteStore 
)

Removes the specified realm from the cluster.

The cluster must be running and all members of the cluster online for this to work correctly.

Parameters
nodeto remove from the cluster.
deleteStoreflag to indicate that the call should also delete ALL cluster stores
Exceptions
nBaseClientExceptionif any nodes fail during the process.
nSessionNotConnectedExceptionif any of the nodes are not connected.
nSecurityExceptionif the client is not authorised.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.deleteSite ( nClusterSite  site)

Method that allows you to delete a site

Parameters
sitethe cluster site to delete
Exceptions
Exceptionif the site was not able to be created
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.delListener ( nClusterEventListener  listener)

Deregisters a nClusterEventListener from the cluster for callbacks.

Parameters
listenerto be removed.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.deregisterRemoteCluster ( nClusterNode  remoteCluster)

Removes a logical connection from this cluster node to a remote cluster node.

This method will throw an Exception if the parameter remoteCluster is null, or if it is equal to
 this object. </summary>
Parameters
remoteClusterthe cluster node to disconnect from
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.destroy ( )

Deletes the cluster and removes all known realms from the cluster.

Exceptions
nBaseClientExceptionif any nodes fail during the process.
nSessionNotConnectedExceptionif any of the nodes are not connected.
nSecurityExceptionif the client is not authorised.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.destroy ( bool  deleteStore)

Deletes the cluster and removes all known realms from the cluster.

  • Parameters
    deleteStoreflag to indicate that the call should also delete ALL cluster stores
    Exceptions
    nBaseClientExceptionif any nodes fail during the process.
    nSessionNotConnectedExceptionif any of the nodes are not connected.
    nSecurityExceptionif the client is not authorised.
static nClusterNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.find ( string  clusterName)
static

Returns the nClusterNode for the specified clusterName.

Parameters
clusterNamename of the cluster to lookup.
Returns
nClusterNode or null if no such cluster is found.
ArrayList com.pcbsys.nirvana.nAdminAPI.nClusterNode.getClusterConnectionStatus ( )

Returns an ArrayList of nClusterStatus which contains the current cluster status.

Returns
ArrayList of nClusterStatus.
static nClusterNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.getInstance ( string  rname)
static

Creates an instance of a nClusterNode for any cluster found on the realm specified by the rname.

Parameters
rnameNirvana Realm server URL
Returns
If any cluster has been defined on the specified realm, will return the nClusterNode relevant.
Exceptions
nBaseAdminExceptionif the user has no administration priviliges
nIllegalArgumentExceptionif the rname is not valid
static nClusterNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.getInstance ( nSessionAttributes  attr,
string  username 
)
static

Creates an instance of a nClusterNode for any cluster found on the realm specified by the nSessionAttributes and the username.

Parameters
attrSession attributes to connect to the remote Nirvana Realm
usernameto use to authenticate
Returns
If any cluster has been defined on the specified realm, will return the nClusterNode relevant.
Exceptions
nBaseAdminExceptionif unable to connect to the remote realm
static nClusterNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.getInstance ( nSessionAttributes  attr)
static

Creates an instance of a nClusterNode for any cluster found on the realm specified by the nSessionAttributes.

Parameters
attrSession attributes to connect to the remote Nirvana Realm
Returns
If any cluster has been defined on the specified realm, will return the nClusterNode relevant.
Exceptions
nBaseAdminExceptionif unable to connect to the remote realm
static ArrayList com.pcbsys.nirvana.nAdminAPI.nClusterNode.getKnownClusters ( )
static

Return an ArrayList of nCluster nodes.

Returns
ArrayList of nodes.
nRealmNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.getMaster ( )

Returns the current master of the cluster.

If the master is not currently connected it will return null

Returns
String name of the master.
nRealmNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.getMaster ( long  timeout)

Returns the current master of the cluster.

Parameters
timeoutthe amount of time in milliseconds to wait for the connection to the master
Returns
String name of the master.
int com.pcbsys.nirvana.nAdminAPI.nClusterNode.getNoOfSites ( )

Returns the number of defined nClusterSite objects

nClusterSite

Returns
a count of nClusterSite objects
nClusterSite com.pcbsys.nirvana.nAdminAPI.nClusterNode.getSite ( string  site)

Returns an nClusterSite object with the specified name

Parameters
sitethe name of the site to return

nClusterSite

Returns
an nClusterSite with the specified name
IEnumerator com.pcbsys.nirvana.nAdminAPI.nClusterNode.getSites ( )

Returns an iterator of nClusterSite objects

nClusterSite

Returns
an iterator of nClusterSite objects
bool com.pcbsys.nirvana.nAdminAPI.nClusterNode.hasMember ( nRealmNode  node)

Tests to see if the supplied node is part of the cluster.

Parameters
nodeto test.
Returns
true if the node is defined in the cluster else false.
Exceptions
nSecurityExceptionif the client is not authorized.
nBaseClientExceptionif the node is not connected.
bool com.pcbsys.nirvana.nAdminAPI.nClusterNode.hasMember ( string  realm)

Tests to see if the supplied realm name is part of the cluster.

Parameters
realmname to test.
Returns
true if the realm is defined in the cluster else false.
Exceptions
nBaseClientExceptionif the node is not connected.
bool com.pcbsys.nirvana.nAdminAPI.nClusterNode.hasquorum ( )

Tests to see if the cluster has quorum and is functioning.

Quorin is defined as the cluster having the ( number of realms ) / 2 +1 being online.

Returns
boolean indicating the current state.
bool com.pcbsys.nirvana.nAdminAPI.nClusterNode.hasSites ( )

Indicated whether this node has sites

<return> true if this node has sites </return>

void com.pcbsys.nirvana.nAdminAPI.nClusterNode.joinRemoteClusterStore ( nLeafNode  source,
nLeafNode  destination,
bool  isRouted,
int  hopCount,
String  selector,
bool  allowPurge 
)

Joins one clustered channel or queue to another clustered channel or queue on a remote cluster.

This method will throw an Exception if the source and destination channel are not clustered. It will
also throw an Exception if the source and destination are on the same cluster.</summary>
Parameters
sourcea nLeafNode which acts as the source of events across this join
destinationa nLeafNode which acts as the destination of events across this join
isRoutedif true, events will be routed across this join
hopCountthe maximum hop count events may have to be sent over this join
selectora string selector which can be used to filter messages over this join
Parameters
allowPurgea boolean value to allow purging on this join
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.modifyMember ( nClusterMemberConfiguration  config)

Modifies the specified realm in the cluster as far as the CanBeMaster flag.

The cluster must be running and all members of the cluster online for this to work correctly.

Parameters
configThe ClusterMemberConfiguration object refering to the node and configuration
Exceptions
nBaseClientExceptionif any nodes fail during the process.
nSessionNotConnectedExceptionif any of the nodes are not connected.
nSecurityExceptionif the client is not authorised.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.registerRemoteCluster ( nClusterNode  remoteCluster)

Creates a logical connection between this cluster node and another remote cluster node.

this method will throw an Exception if the remoteCluster parameter is null, or if remoteCluster is
 equal to this object. </summary>
Parameters
remoteClusterthe cluster node to connect to