if ( this.localAllowed ) {
// internal boolean to disallow local connections
GridNode gnode = this.grid.getGridNode( gsd.getId() );
if ( gnode != null ) {
conn = new LocalGridNodeConnection( gnode );
}
}
if ( conn == null ) {
conn = new RemoteGridNodeConnection( this.grid,