class CumulusTorSwitchService implements ISwitchService {

    @Override
    public boolean discoverSwitch( SwitchNode switchNode )
    {
        boolean isCumulus = false;

        if ( "SSH".equalsIgnoreCase( switchNode.getProtocol() ) )
        {
            SwitchSession switchSession = getSession( switchNode );
            if ( switchSession != null )
            {
                try
                {
                    String countStr = switchSession.execute( CumulusConstants.CUMULUS_DISCOVER_COMMAND );
                    if ( countStr != null && countStr.length() > 0 )
                    {
                        int count = Integer.parseInt( countStr );
                        isCumulus = ( count > 0 );
                    }
                }
                catch ( Exception e )
                {
                    logger.debug( "Received exception while discovering Cumulus switch.", e );
                }
            }
        }

        return ( isCumulus );
    }

}